Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving position of docked toolbar
Message
 
 
To
27/10/2003 23:20:50
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00843368
Message ID:
00843372
Views:
24
>Is there a command which will move a docked toolbar to the left most available position.
>
>I have a situation where I create a new toolbar, and then make the existing one not visible. When I release the new toolbar and make the old one visible it has moved to the right as if the released toolbar was still there.
>
>eg
>otbnew= createobject('tbnew')
>otbnew.dock(0)
>otbnew.visible = .T.
>tbold.visible = .F.
>* this leaves the new toolbar to the left
>*
>* do stuff here
>*
>tbold.visible = .T.
>otbnew.release()
>* this leaves a gap - but I wan't the old toolbar back where it was.
>
>I also need to do this in a way that doesn't cause forms to jump all over the place, ie there must always be at least one toolbar present.

David,
Parameters 2 and 3 of the ToolBar.Dock method can be used to specify the position of the toolbar.
otbnew.Dock(0,0,0)
I'm not sure if this will move a toolbar already docked at that position but you can try it and see. If it doesn't, you could move the old toolbar using its Dock method and specify something far to the right. You could then dock the new toolbar to the left and clear the old one. Do the steps in reverse to display the old toolbar to the left.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform