Results 1 to 4 of 4

Thread: Disable all in frame

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Hi chaps, anyone tell me a way of disabling everything (or at least all the buttons) within a frame, so they actually look disabled, without having to reference them all? Can it be done with that thing where you go:
    Code:
    For Each c in frmMyFrame
     c.Enabled = False
    Next c
    or would that be a simply MAAAAAD thing to do. Doesn't seem to work for me anyway, I was just giving suggestions to mislead the young and easily misled. I think I'd better go now...

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    you could loop thru the controls collection and test the .container property of each control, eg

    Dim Ctrl as control

    for each ctrl in cotrols
    if ctrl.container = <Whatever your frame is called>
    ctrl.enabled = false
    endif
    next ctrl

    that should work. (i think...)

  3. #3
    Guest
    Set the Enabled property of the Frame to False. This will disable everything inside of it as well.


  4. #4

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Jimbob, thanks mate, worked for me.

    Megatron, thanks, but, whilst setting the Frame's enabled property to false does indeed disable everything inside it, they don't LOOK disabled, which was what I was trying to achieve.

    Cheers anyway!

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