I have a need to create a dynamic ColumnInfo for a listbrowser. I want to be able to add nodes in a loop like you would when adding to the listbrowser's items. The number of columns may vary. The order may vary, which is the biggest need for dynamic creation.
create AllocLBColumnInfo() without specifying number of columns (or anything)
create a new list
for(;;)
{
allocate a new node
fill in details
add to list
}
attach list to ColumnInfo
attach ColumnInfo to listbrowser
Similar to how a Chooser list is created, too:
SelectByTypeChooserList=ChooserLabels(NULL); ChooserNode=IChooser->AllocChooserNode( CNA_Text, SAK_LocaleString(MSG_DT_SYSTEM), TAG_DONE); SAK_AddChooserNode(SelectByTypeChooserList,ChooserNode,GLIST_BOTTOM); ChooserNode=IChooser->AllocChooserNode( CNA_Text, SAK_LocaleString(MSG_DT_TEXT), TAG_DONE); SAK_AddChooserNode(SelectByTypeChooserList,ChooserNode,GLIST_BOTTOM); ChooserNode=IChooser->AllocChooserNode( CNA_Text, SAK_LocaleString(MSG_DT_DOCUMENT), TAG_DONE); SAK_AddChooserNode(SelectByTypeChooserList,ChooserNode,GLIST_BOTTOM);