Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Workaround to dock toolbars to a top-level form # vfp ma
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00751335
Message ID:
00754863
Vues:
31
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform