Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

frame visibility

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
I load up my form and the frame is visible (visible = true).

I set visible on the frame to false and it disappears.

I then set visible on the frame to true and it just doesn't change:

Frame1.Visible = True
MsgBox Frame1.Visible

I get a False from the msgbox... anyone any ideas why?

 
I just tried it in VB5, with and without a caption on the frame, and it worked ok for me.

I used 2 command buttons:

Command1_Click - Frame1.Visible = True
Command2_Click - Frame1.Visible = False

Is it hidden behind any other components on your Form, another Frame, Picture Box etc?



 
If it was hidden the visible property should still be 'True' after setting it too true.

I was thinking is there some sort of lock on a frame control which disables this action?
 
No, the Frame control doesn't have a lock switch.

If you don't already have any other controls on the frame, try placing something on it and see if that makes a difference.

Because I can't duplicate your problem I can't offer any other help but hopefully by moving the thread back to the top of the pile somebody else may pick it up.

Good Luck
 
Fixed it.. oops... the stupid frame was actually in another frame which was getting the visible to false. They were both the same size thus why it wasn't obvious.

If you have a frame in another frame which has its visible to false, then its impossible to set the second frames visible to true.


Cheers anyhoo!!
 
That's what I meant yesterday when I asked:-

"Is it hidden behind any other components on your Form, another Frame, Picture Box etc?"

Glad you managed to find it.

Big Al
 
99mel

> If you have a frame in another frame which has its visible to false, then its impossible to set the second frames
visible to true.

If you need to do this, then paste the second frame onto the form and drag it over the first frame. Don't paste it directly onto the first frame.

Big Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top