Class ImGuiTableFlags
-> 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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDraw all borders.static final intDraw horizontal borders.static final intDraw inner borders.static final intDraw horizontal borders between rows.static final intDraw vertical borders between columns.static final intDraw outer borders.static final intDraw horizontal borders at the top and bottom.static final intDraw vertical borders on the left and right sides.static final intDraw vertical borders.static final intRight-click on columns body/contents will also display table context menu.static final intEnable hiding/disabling columns in context menu.static final intHighlight column headers when hovered (may evolve into a fuller highlight)static final int[ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers).static final int[ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers).static final intDisable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns).static final intMake outer width auto-fit to columns, overriding outer_size.x value.static final intMake outer height stop exactly at outer_size.y (prevent auto-extending table past the limit).static final intDisable keeping column always minimally visible when ScrollX is off and table gets too small.static final intFeaturesstatic final intDisable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).static final intDefault if BordersOuterV is off.static final intDisable persisting columns order, width, visibility and sort settings in the .ini file.static final intDefault if BordersOuterV is on.static final intDisable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34.static final intEnable reordering columns in header row.static final intEnable resizing columns.static final intSet each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)static final intEnable horizontal scrolling.static final intEnable vertical scrolling.static final intColumns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.static final intColumns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns.static final int[Internal] Combinations and masksstatic final intColumns default to _WidthStretch with default weights proportional to each columns contents widths.static final intColumns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().static final intEnable sorting.static final intHold shift when clicking headers to sort on multiple column.static final intAllow no sorting, disable default sorting. -
Method Summary
-
Field Details
-
None
public static final int NoneFeaturesDefinition:
0- See Also:
-
Resizable
public static final int ResizableEnable resizing columns.Definition:
1 << 0- See Also:
-
Reorderable
public static final int ReorderableEnable reordering columns in header row. (Need calling TableSetupColumn() + TableHeadersRow() to display headers, or using ImGuiTableFlags_ContextMenuInBody to access context-menu without headers).Definition:
1 << 1- See Also:
-
Hideable
public static final int HideableEnable hiding/disabling columns in context menu.Definition:
1 << 2- See Also:
-
Sortable
public static final int SortableEnable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.Definition:
1 << 3- See Also:
-
NoSavedSettings
public static final int NoSavedSettingsDisable persisting columns order, width, visibility and sort settings in the .ini file.Definition:
1 << 4- See Also:
-
ContextMenuInBody
public static final int ContextMenuInBodyRight-click on columns body/contents will also display table context menu. By default it is available in TableHeadersRow().Definition:
1 << 5- See Also:
-
RowBg
public static final int RowBgSet each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)Definition:
1 << 6- See Also:
-
BordersInnerH
public static final int BordersInnerHDraw horizontal borders between rows.Definition:
1 << 7- See Also:
-
BordersOuterH
public static final int BordersOuterHDraw horizontal borders at the top and bottom.Definition:
1 << 8- See Also:
-
BordersInnerV
public static final int BordersInnerVDraw vertical borders between columns.Definition:
1 << 9- See Also:
-
BordersOuterV
public static final int BordersOuterVDraw vertical borders on the left and right sides.Definition:
1 << 10- See Also:
-
BordersH
public static final int BordersHDraw horizontal borders.Definition:
ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH- See Also:
-
BordersV
public static final int BordersVDraw vertical borders.Definition:
ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV- See Also:
-
BordersInner
public static final int BordersInnerDraw inner borders.Definition:
ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH- See Also:
-
BordersOuter
public static final int BordersOuterDraw outer borders.Definition:
ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH- See Also:
-
Borders
public static final int BordersDraw all borders.Definition:
ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter- See Also:
-
NoBordersInBody
public static final int NoBordersInBody[ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers).->May move to styleDefinition:
1 << 11- See Also:
-
NoBordersInBodyUntilResize
public static final int NoBordersInBodyUntilResize[ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers).->May move to styleDefinition:
1 << 12- See Also:
-
SizingFixedFit
public static final int SizingFixedFitColumns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.Definition:
1 << 13- See Also:
-
SizingFixedSame
public static final int SizingFixedSameColumns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.Definition:
2 << 13- See Also:
-
SizingStretchProp
public static final int SizingStretchPropColumns default to _WidthStretch with default weights proportional to each columns contents widths.Definition:
3 << 13- See Also:
-
SizingStretchSame
public static final int SizingStretchSameColumns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().Definition:
4 << 13- See Also:
-
NoHostExtendX
public static final int NoHostExtendXMake outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.Definition:
1 << 16- See Also:
-
NoHostExtendY
public static final int NoHostExtendYMake outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.Definition:
1 << 17- See Also:
-
NoKeepColumnsVisible
public static final int NoKeepColumnsVisibleDisable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.Definition:
1 << 18- See Also:
-
PreciseWidths
public static final int PreciseWidthsDisable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.Definition:
1 << 19- See Also:
-
NoClip
public static final int NoClipDisable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().Definition:
1 << 20- See Also:
-
PadOuterX
public static final int PadOuterXDefault if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.Definition:
1 << 21- See Also:
-
NoPadOuterX
public static final int NoPadOuterXDefault if BordersOuterV is off. Disable outermost padding.Definition:
1 << 22- See Also:
-
NoPadInnerX
public static final int NoPadInnerXDisable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).Definition:
1 << 23- See Also:
-
ScrollX
public static final int ScrollXEnable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.Definition:
1 << 24- See Also:
-
ScrollY
public static final int ScrollYEnable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.Definition:
1 << 25- See Also:
-
SortMulti
public static final int SortMultiHold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount>1).Definition:
1 << 26- See Also:
-
SortTristate
public static final int SortTristateAllow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).Definition:
1 << 27- See Also:
-
HighlightHoveredColumn
public static final int HighlightHoveredColumnHighlight column headers when hovered (may evolve into a fuller highlight)Definition:
1 << 28- See Also:
-
SizingMask_
public static final int SizingMask_[Internal] Combinations and masksDefinition:
ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame- See Also:
-