If else and what ever :( (Newbie)

  • Thread starter Thread starter 5070707
  • Start date Start date
5

5070707

Hi all!
Well, here is somewhat a newbie question that im sure a lot of people
will know how to answer!
i have a simple form in a windows application i created using VS2005.
(visual basic)
in that form i created two check boxes.
what im trying to do is:
when a user click the first one - then a predefined field will open
for him to fill.
when a user click the 2nd one - other set of predefined fields will be
open while the other ones stay diabled.

and vice versa.

could anyone send me a sample code of how to do this so i can use it
on my own app?

Cheers!!

50.
 
Hi 5070707,


To simplify things, what you need is a method called "DisableAll". This
method disables all of the fields on the form (myfield.Enabled = False).
Then you handle the "Click" message of either check box, calling
"DisableAll" in the handler and then making the field you want enabled,
enabled (myfield.Enabled = True)


Robin
 
in that form i created two check boxes.
what im trying to do is:
when a user click the first one - then a predefined field will open
for him to fill.
when a user click the 2nd one - other set of predefined fields will be
open while the other ones stay diabled.

and vice versa.

That sounds like you want radio buttons (mutually exclusive) rather than
checkboxes (more than one can be checked) in the UI.

Andrew
 
Back
Top