cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum
GDL coding questions, Python and add-on development using the API Dev Kit.

How to display the headers of the ListBox?

Anonymous
Not applicable
In my ListBox, it has Three headers.

DGListSetHeaderItemCount(dialId, item, 3);
DGListSetHeaderFlags(dialId, item, true, false, false);
DGListSetHeaderItemFlags(dialId, item, 1, DG_IS_CENTER|DG_IS_TRUNCMIDDLE, false);
DGListSetHeaderItemText(dialId, item, 1, "ID");

DGListSetHeaderItemFlags(dialId, item, 2, DG_IS_CENTER|DG_IS_TRUNCMIDDLE, false);
DGListSetHeaderItemText(dialId, item, 2, "Length");

DGListSetHeaderItemFlags(dialId, item, 3, DG_IS_CENTER|DG_IS_TRUNCMIDDLE, false);
DGListSetHeaderItemText(dialId, item, 3, "Has");
But They can not display all.

Why??
2 REPLIES 2

Akos Somorjai
Graphisoft
Graphisoft
You have to set the header item size as well with DGListSetHeaderItemSize.

Hope this helps,

Akos

ReignBough
Booster
When creating class-based list box with header, the list box is not created. Also when HasHeader() is called, it will return false whether headerFlag is set to Header or NoHeader.

SingleSelListBox (
    const Panel &       panel,
    const Rect &        rect,
    ScrollType          scroll = VScroll,
    PartialItemType     part = PartialItems,
    HeaderFlag          headerFlag = NoHeader,   <------------------
    short               headerSize = 0
);

MultiSelListBox (
    const Panel &       panel,
    const Rect &        rect,
    ScrollType          scroll = VScroll,
    PartialItemType     part = PartialItems,
    HeaderFlag          headerFlag = NoHeader,   <------------------
    short               headerSize = 0);
~ReignBough~
ARCHICAD 24 INT 4018 FULL (from AC18)
Windows 10 Pro, Intel Core i7-4790 CPU @ 3.60GHz, 32.0GB RAM, 64-bit OS

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!