2012-08-24 03:20 UTC
Hi all,
I have 4 Option buttons (not Option list). Button 1,2 is a group set and button 3,4 is another group set. If click 1 and 3 then show a image in Picture box, click 1,4 then show another one, Clicked Events is on in odcl but I just can't make it. Please anyone can see my code.
(command "OPENDCL")
(defun c:test ()
(dcl_Project_Load "Test" T)
(dcl_Form_Show test_Form1)
(princ)
)
(defun c:test_Form1_OptionButton1_OnClicked (/)
(setq button1_value (dcl_Control_GetValue test_Form1_OptionButton1))
(setq button3_value (dcl_Control_GetValue test_Form1_OptionButton3))
(setq button4_value (dcl_Control_GetValue test_Form1_OptionButton4))
(if (and (= button1_value 1)(= button3_value 1))
(dcl_Control_SetPicture test_Form1_PictureBox1 101)
)
(if (and (= button1_value 1)(= button4_value 1))
(dcl_Control_SetPicture test_Form1_PictureBox1 102)
)
)
Thank you.
T
I have 4 Option buttons (not Option list). Button 1,2 is a group set and button 3,4 is another group set. If click 1 and 3 then show a image in Picture box, click 1,4 then show another one, Clicked Events is on in odcl but I just can't make it. Please anyone can see my code.
(command "OPENDCL")
(defun c:test ()
(dcl_Project_Load "Test" T)
(dcl_Form_Show test_Form1)
(princ)
)
(defun c:test_Form1_OptionButton1_OnClicked (/)
(setq button1_value (dcl_Control_GetValue test_Form1_OptionButton1))
(setq button3_value (dcl_Control_GetValue test_Form1_OptionButton3))
(setq button4_value (dcl_Control_GetValue test_Form1_OptionButton4))
(if (and (= button1_value 1)(= button3_value 1))
(dcl_Control_SetPicture test_Form1_PictureBox1 101)
)
(if (and (= button1_value 1)(= button4_value 1))
(dcl_Control_SetPicture test_Form1_PictureBox1 102)
)
)
Thank you.
T