Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Workaround to dock toolbars to a top-level form # vfp ma
Message
 
To
18/02/2003 09:50:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00751335
Message ID:
00754863
Views:
38
I've been struggling with the same problem for quite some time, but seem to have found a workaround for it. Whenever a toolbar gets instantiated it seemed to be locked to the active window, mostly being the _SCREEN. Instead of launching the toolbar from the Init of the SDI form I launch it from the Activate method. This seems to do the trick for me quite nicely. The only thing you need to take care of is preventing to launch the toolbar multiple times. You can do this quite easy by adding a .F. initialised property to your form. Then in your Activate method there should be some code like:

Activate method:

IF THIS.lToolBarDefined = .F.

** Create the Toolbar in the CreateSDIFormToolBar method
THIS.CreateSDIFormToolbar()
THIS.lToolBarDefined = .T.
ENDIF

CreateSDIFormToolbar method:

THIS.oToolBar=CREATE("stdsditoolbar",THISFORM)
THIS.oToolBar.Dock(0)
THIS.oToolBar.Show()

I hope this gets you started on solving the problem.

Best regards,

Jan-Peter
With best regards,

Jan-Peter Groeneweg

BCS International BV
Netherlands
Previous
Reply
Map
View

Click here to load this message in the networking platform