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 Directory selection using PtFileSel
Ref. No. QNX.000009786
Category(ies) Development
Issue I would like to allow my Data Aquisition System (DAS) users to select a project (directory).

My question is:

x09Is there a way to provide directories, only, for PtFileSelection, instead of directories and files?

Can I use PtFileSel to display directories only?

Solution There is no way to provide directories, only, for PtFileSelection, instead of directories and files.
PtFileSel can be used to display directiries only. It is done by setting Pt_AR_FS_FLAGS to Pt_FS_SHOW_DIRS.
Here is an example from the Widget reference:

...
PtSetArg(&args[0], Pt_ARG_FS_FLAGS, Pt_FS_SHOW_DIRS, Pt_FS_ALL_FLAGS);
PtSetArg(&args[1], Pt_ARG_FS_ROOT_DIR, "/", 0);
PtSetArg(&args[2], Pt_ARG_AREA, area, 0);
PtCreateWidget(PtFileSel, 3, args);