Hi fellows,
There are 2 possibilities to fill a listbox with an array of file names or directory list. The first method is to collect the file names in a (Power) Basic array, using FindFirst/FindNext, and then pass the array's name through the CONTROL ADD LISTBOX command.
An alternative is to send the %LB_DIR message to the control, using wParam (if necessary) for file attributes and lParam for a pointer to the directory. In this case the listbox takes care of the collect job. This seems to be the right format:
When using this method, however, long filenames show up in 8.3 notation, abbreviated by the tilde character. Is this normal, or am I doing something wrong, as usual.
------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/
There are 2 possibilities to fill a listbox with an array of file names or directory list. The first method is to collect the file names in a (Power) Basic array, using FindFirst/FindNext, and then pass the array's name through the CONTROL ADD LISTBOX command.
An alternative is to send the %LB_DIR message to the control, using wParam (if necessary) for file attributes and lParam for a pointer to the directory. In this case the listbox takes care of the collect job. This seems to be the right format:
Code:
dirmask$ = DirectoryPathName + "\*.*" CONTROL SEND CBHNDL, %IDLISTBOX, %LB_DIR, 0, STRPTR(dirmask$)

------------------
mailto:[email protected][email protected]</A>
www.basicguru.com/zijlema/
Comment