07-09-2018, 12:57 PM
Hi !
For my current project i would like to know how it's possible, using Dialog, to update values in a List.
For example, in this simple dialog :
Macro Macro2
I would like, when you press the button, to replace the default values in the list by the new ones (Choice4, Choice5, Choice 6)
Since now i always used .setwintext for update button text, static text, edit boxes... but i can't find a way to make this work with lists
Thanks in advance !
For my current project i would like to know how it's possible, using Dialog, to update values in a List.
For example, in this simple dialog :
Macro Macro2
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 ListBox 0x54230101 0x200 8 12 96 102 ""
;4 Button 0x54032000 0x0 136 44 48 40 "Change values in list"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "3"
str lb3
lb3="Choice1[]Choice2[]Choice3"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;Change values in list
,,str newvalues="Choice4[]Choice5[]Choice6"
,,newvalues.setwintext(id(3 hDlg))
ret 1
I would like, when you press the button, to replace the default values in the list by the new ones (Choice4, Choice5, Choice 6)
Since now i always used .setwintext for update button text, static text, edit boxes... but i can't find a way to make this work with lists
Thanks in advance !