Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog with Muti Text Boxes on change
#5
something like this
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 166 144 "Dialog" "4"
;3 Static 0x54000000 0x0 10 15 48 12 "field 1"
;4 Edit 0x54030080 0x200 60 15 92 12 ""
;5 Static 0x54000000 0x0 10 35 48 12 "field 2"
;6 Edit 0x54030080 0x200 60 35 92 12 ""
;7 Static 0x54000000 0x4 10 55 48 12 "field 3"
;8 Edit 0x54030080 0x204 60 55 92 12 ""
;9 Edit 0x54030080 0x200 9 119 144 12 ""
;10 ComboBox 0x54230243 0x0 60 75 92 213 ""
;11 Static 0x54000000 0x0 10 75 48 12 "combo1"
;12 Static 0x54000000 0x0 10 95 48 12 "combo2"
;13 ComboBox 0x54230243 0x0 60 95 92 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

str controls = "4 6 8 9 10 13"
str e4 e6 e8 e9 cb10 cb13
cb10=
;one
;two
;three

cb13=
;four
;five
;six

if(!ShowDialog(dd &sub.DlgProc &controls)) ret

#sub DlgProc v;; must have v attribute
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [EN_CHANGE<<16|4,EN_CHANGE<<16|6,EN_CHANGE<<16|8,CBN_SELENDOK<<16|10,CBN_SELENDOK<<16|13]
,DT_GetControls(hDlg)
,str cbt1=iif((cb10.replacerx("\d* " "")=0) "" cb10)
,str cbt2=iif((cb13.replacerx("\d* " "")=0) "" cb13)
,_s=F"{e4},{e6},{e8},{cbt1},{cbt2}"
,;; e4,e6,e8 are  variables created by dialog editor as shown in this line "str e4 e6 e8 e9" above and need to be changed to match your dialog variables
,DT_SetControl(hDlg 9 _s)

ret 1


Messages In This Thread
Dialog with Muti Text Boxes on change - by Firas - 06-18-2020, 09:51 AM
RE: Dialog with Muti Text Boxes on change - by Kevin - 06-18-2020, 09:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)