Started by jmcgrew ·
2012-02-20 18:52 UTC ·
4 replies · SMF topic #1758
jmcgrew
2012-02-20 18:52 UTC
Ok I am very new at this so sorry in advance. What I am trying to do is I have a dropdown that list different locations and I have two check box's that I want there Visibility to change per what is selected in my dropdown (ex. dropdown set to "General" both checkbox's are not visible, dropdown set to "Oklahoma" checkbox1 is visible but not checkbox2)
Thanks for any help
fred_tomke
2012-02-20 21:21 UTC
Hi and welcome,
without knowing your code I can give you this sample:
(defun c:myproject_myform_mycombo_OnSelChanged (intRow strItem)
;; intRow 0 = General
;; intRow 1 = Oklahoma
;; intRow 2 = Berlin
(dcl_control_setvisible myproject_myform_mycheckbox1 (= intRow 1))
(dcl_control_setvisible myproject_myform_mycheckbox2 (= intRow 2))
); c:myproject_myform_mycombo_OnSelChanged
Regards, Fred
jmcgrew
2012-02-20 22:10 UTC
Fred,
Here is my code and odcl, its pretty rough but working on it.
fred_tomke
2012-02-21 12:50 UTC
Hi,
as I mentioned you should catch the event OnSelChanged, but not OnDropDown. OnDropDown is normally used if the list should be filled right before the user is going to open the dropdownlist. I recommend you to change your code the way I've shown in my sample.
Regards, Fred
jmcgrew
2012-02-21 15:01 UTC
Fred,
That worked perfect thanks for the help!
Jutin