-
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...
-
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...)
-
Set the Enabled property of the Frame to False. This will disable everything inside of it as well.
-
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!