Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialogbox with 2 options
#1
Hello i want to make a dialogbox with 2 options
when u check option 1 activate buttons below it and same for 2nd option
i coulndt figure it out how to make it
anyone please help me ?
Thank you.


[Image: 6L4TqtAw_Untitled.png]
#2
Do you mean  you want the buttons disabled until an option button  is checked?

Function Dialog_Enable_Disable_buttons_example
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 242 130 "Dialog" "4"
;3 Button 0x54012003 0x0 8 8 48 10 "Option 1"
;4 Button 0x54012003 0x0 129 8 48 10 "Option 2"
;7 Button 0x5C032000 0x0 8 32 48 14 "Button"
;8 Button 0x5C032000 0x0 8 52 48 14 "Button"
;9 Button 0x5C032000 0x0 8 72 48 14 "Button"
;10 Button 0x5C032000 0x0 8 92 48 14 "Button"
;11 Button 0x5C032000 0x0 128 32 48 14 "Button"
;12 Button 0x5C032000 0x0 128 56 48 14 "Button"
;13 Button 0x5C032000 0x0 128 80 48 14 "Button"
;1 Button 0x54030001 0x4 120 136 48 14 "OK"
;2 Button 0x54030000 0x4 168 136 48 14 "Cancel"
;5 Button 0x54020007 0x0 8 16 108 100 ""
;6 Button 0x54020007 0x0 127 16 108 100 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040C00 "*" "" "" ""

str controls = "3 4"
str c3Opt c4Opt
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 3 ;;Option 1
,if(IsDlgButtonChecked(hDlg 3))
,,but- id(4 hDlg)
,,TO_Enable hDlg "7 8 9 10" 1
,,TO_Enable hDlg "11 12 13" 0
,else
,,TO_Enable hDlg "7 8 9 10" 0
,case 4 ;;Option 2
,if(IsDlgButtonChecked(hDlg 4))
,,but- id(3 hDlg)
,,TO_Enable hDlg "7 8 9 10" 0
,,TO_Enable hDlg "11 12 13" 1
,else
,,TO_Enable hDlg "11 12 13" 0
ret 1
#3
Excatly!!! Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)