Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Dialog] Change values in list
#1
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
Code:
Copy      Help
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 !


Messages In This Thread
[Dialog] Change values in list - by Extreme - 07-09-2018, 12:57 PM
RE: [Dialog] Change values in list - by Kevin - 07-09-2018, 01:29 PM
RE: [Dialog] Change values in list - by Extreme - 07-09-2018, 02:31 PM
RE: [Dialog] Change values in list - by Gintaras - 07-09-2018, 03:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)