|
-
Oct 21st, 2000, 09:13 AM
#1
Thread Starter
Hyperactive Member
Hi,
I have a frame and few controls on it (combos, labels etc.). I know that when I disable the frame, the controls that are on it get disabled too... but they they're not grayed out automatically.
Is there a way to gray them out when disabling the frame or do I have to use:
'control.Enabled = False'
to all of them?
Is there a better way to gray out a number of controls atatched to a frame?
Thanks
-
Oct 21st, 2000, 09:30 AM
#2
For every control in the Frame, set their Tag to 1. Then you can use a For...Each loop for every control, check if it's Tag is 1; if so, it will be disabled.
Code:
Frame1.Enabled = False
Dim ctl As Control
For Each ctl In Controls
If ctl.Tag = "1" Then ctl.Enabled = False
Next ctl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|