Results 1 to 2 of 2

Thread: Disabling AND graying out controls on a frame

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Ont, Canada, Earth
    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?



  2. #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.
    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

Click Here to Expand Forum to Full Width