Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title How to create a scrolling list with resizable column headings?
Ref. No. QNX.000009981
Category(ies) Development
Issue How do you make a scrolling list of arbitrary items with re-sizeable column headings at the top?
Solution To display items in columns, you can:

Create a PtDivider widget as a child of the PtList. Put it at the top of the list, and create (for example) PtButton widgets as children of the divider, one for each column. The width of each button is the width of the column.
Or
Use the inherited Pt_ARG_LIST_COLUMN_POS resource.

With both methods, the Tab character is used in the item strings as a column separator.

Note: Even if you use columns, each line in the list remains a single item. When you click on any part of the line, the entire line is selected - having columns doesn't make the list into a spreadsheet.