[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] Problem with listbox
From: |
Alexander Pipelka |
Subject: |
Re: [paragui-users] Problem with listbox |
Date: |
29 May 2002 09:39:17 +0200 |
Am Fre, 2002-05-17 um 17.30 schrieb Roger D. Vargas:
>
>
> I have the following code to fill a listbox with a directory list:
>
> char **files;
> int i;
>
> //Get files in the save dir
> files=PG_FileArchive::EnumerateFiles("save");
>
> for (i=0;files[i];i++) {
> fnames->SetText(files[i]);
> flist->AddItem(fnames);
> PG_LogMSG(files[i]);
> }
> flist->SelectFirstItem();
>
> Show();
> RunModal();
I just reviewed your code.
Shouldn't the loop be:
for (i=0;files[i];i++) {
fnames = new PG_ListBoxItem(itemheight, files[i]); <<<
flist->AddItem(fnames);
PG_LogMSG(files[i]);
}
???
Alex