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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

visible behavior in dockable forms

Status
Not open for further replies.

rkolva

Programmer
Jan 16, 2003
127
US
I've managed to work around this unusual behavior but was wondering if it is normal or did I do something to make this happen in my form? I have dockable form that can be toggled on and off via a toolbar (visibility). Testing it I noticed that the form resized a little every time I toggled the visibility.

My guess is that the form's position and size is being drawn as I left it and then the title bar is being adjusted afterward (to reflect the dockable setting) to make it appear that it's getting smaller and moving across the screen?

Have others here experienced this?

Code:
PUBLIC oform 

oform = CREATEOBJECT('form')
oform.Visible = .t.
oform.Dockable = 1
oform.left = 200
oform.Top = 200
oform.Width = 200
oform.Height = 200

? [Starting values]
? [left: ] + TRANSFORM(oform.Left)
? [top: ] + TRANSFORM(oform.top)
? [height: ] + TRANSFORM(oform.height)
? [width: ] + TRANSFORM(oform.width)

oform.Hide()
oform.show()

? [Ending values]
? [left: ] + TRANSFORM(oform.Left)
? [top: ] + TRANSFORM(oform.top)
? [height: ] + TRANSFORM(oform.height)
? [width: ] + TRANSFORM(oform.width)

Ralph Kolva
 
I see the same behavior. Your explanation makes some sense. FWIW, you can solve the problem by setting Dockable = 0 before hiding and resetting it to 1 after showing. You can probably encapsulate that code in the relevant methods.

You may want to report this as a bug and see what the team says.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top