02-28-2008, 04:14 AM
Hey i made this with other stuff i found on the forum.
Was wondering if maybe this could populate a listbox instead of a combox instead?
Was wondering if maybe this could populate a listbox instead of a combox instead?
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "4"
str cb4
if(!ShowDialog("DependentCombo" &DependentCombo &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 42 "My Document Selecter"
;4 ComboBox 0x54230243 0x0 4 6 212 213 ""
;3 Button 0x54032000 0x0 168 24 48 14 "Open"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_DROPDOWN<<16|4
,int hcb=id(4 hDlg)
,SendMessage hcb CB_RESETCONTENT 0 0
,Dir dFolder
,foreach(dFolder "$personal$\*" FE_Dir)
,,SendMessage hcb CB_ADDSTRING 0 dFolder.FileName
,case 3
,str Open Final
,Open.getwintext(id(4 hDlg))
,Final.formata("$personal$\%s" Open)
,run Final
,case IDOK
,case IDCANCEL
ret 1