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 PtList with multiple columns
Ref. No. QNX.000009913
Category(ies) Development
Issue 1. How do you add an item to a PtList widget
2. How do you use Pt_ARG_LIST_COLUMN_POS to setup 5 columns in the PtList widget?

Solution 1. Adding an item to the PtList widget
x09
x09const char *item = "OnetTwotThreetFourtFive";
x09PtListAddItems(ABW_list, &item, 1, 0);

2.x09Setting up 5 columns in PtList widget

x09static const PtListColumn_t columns[] = {
x09x09{5, 50},
x09x09{55,100},
x09x09{105,150},
x09x09{155,200},
x09x09{205, 250}
x09};
x09static const PtArg_t arg = Pt_ARG(Pt_ARG_LIST_COLUMN_POS, columns, sizeof(columns)/sizeof(columns[0]));
PtSetResources(ABW_list, 1, &arg);