public final class ImGuiTableFlags
extends java.lang.Object
->
all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
- Columns sizing policy allowed: Stretch (default), Fixed/Auto.
- Fixed Columns will generally obtain their requested width (unless the table cannot fit them all).
- Stretch Columns will share the remaining width.
- Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
(this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
- When ScrollX is on:
- Table defaults to SizingFixedFit ->
all Columns defaults to ImGuiTableColumnFlags_WidthFixed
- Columns sizing policy allowed: Fixed/Auto mostly.
- Fixed Columns can be enlarged as needed. Table will show an horizontal scrollbar if needed.
- When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop.
- Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
- Read on documentation at the top of imgui_tables.cpp for details.Modifier and Type | Field and Description |
---|---|
static int |
Borders
Draw all borders.
|
static int |
BordersH
Draw horizontal borders.
|
static int |
BordersInner
Draw inner borders.
|
static int |
BordersInnerH
Draw horizontal borders between rows.
|
static int |
BordersInnerV
Draw vertical borders between columns.
|
static int |
BordersOuter
Draw outer borders.
|
static int |
BordersOuterH
Draw horizontal borders at the top and bottom.
|
static int |
BordersOuterV
Draw vertical borders on the left and right sides.
|
static int |
BordersV
Draw vertical borders.
|
static int |
ContextMenuInBody
Right-click on columns body/contents will display table context menu.
|
static int |
Hideable
Enable hiding/disabling columns in context menu.
|
static int |
NoBordersInBody
[ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers).
|
static int |
NoBordersInBodyUntilResize
[ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers).
|
static int |
NoClip
Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns).
|
static int |
NoHostExtendX
Make outer width auto-fit to columns, overriding outer_size.x value.
|
static int |
NoHostExtendY
Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit).
|
static int |
NoKeepColumnsVisible
Disable keeping column always minimally visible when ScrollX is off and table gets too small.
|
static int |
None |
static int |
NoPadInnerX |
static int |
NoPadOuterX
Default if BordersOuterV is off.
|
static int |
NoSavedSettings
Disable persisting columns order, width and sort settings in the .ini file.
|
static int |
PadOuterX
Default if BordersOuterV is on.
|
static int |
PreciseWidths
Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34.
|
static int |
Reorderable
Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
|
static int |
Resizable
Enable resizing columns.
|
static int |
RowBg
Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
|
static int |
ScrollX
Enable horizontal scrolling.
|
static int |
ScrollY
Enable vertical scrolling.
|
static int |
SizingFixedFit
Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
|
static int |
SizingFixedSame
Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns.
|
static int |
SizingStretchProp
Columns default to _WidthStretch with default weights proportional to each columns contents widths.
|
static int |
SizingStretchSame
Columns default to _WidthStretch with default weights all equal, unless overriden by TableSetupColumn().
|
static int |
Sortable
Enable sorting.
|
static int |
SortMulti
Hold shift when clicking headers to sort on multiple column.
|
static int |
SortTristate
Allow no sorting, disable default sorting.
|
public static final int None
public static final int Resizable
public static final int Reorderable
public static final int Hideable
public static final int Sortable
public static final int NoSavedSettings
public static final int ContextMenuInBody
public static final int RowBg
public static final int BordersInnerH
public static final int BordersOuterH
public static final int BordersInnerV
public static final int BordersOuterV
public static final int BordersH
public static final int BordersV
public static final int BordersInner
public static final int BordersOuter
public static final int Borders
public static final int NoBordersInBody
->
May move to stylepublic static final int NoBordersInBodyUntilResize
->
May move to stylepublic static final int SizingFixedFit
public static final int SizingFixedSame
public static final int SizingStretchProp
public static final int SizingStretchSame
public static final int NoHostExtendX
public static final int NoHostExtendY
public static final int NoKeepColumnsVisible
public static final int PreciseWidths
public static final int NoClip
public static final int PadOuterX
public static final int NoPadOuterX
public static final int NoPadInnerX
public static final int ScrollX
public static final int ScrollY
public static final int SortMulti
>
1).public static final int SortTristate