Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Toolbar problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Toolbar problems
Divers
Thread ID:
00355774
Message ID:
00355774
Vues:
61
I have created a toolbar based on the VFP foundation class 'toolbar'. It is created using:
oBenToolbar=CREATEOBJECT('toolbar')
Two problems:
1. There is a tiny 'X' checkbox on the corner that I can't find among the toobar container's properties. When the toolbar is instantiated in runtime, clicking on if released the toolbar. I can't figure out how to get rid of it. Anyone know?
2. Mostly (though not solely) as a workaround for #1, I have created a SkipFor procedure called lToolbarAlreadyOpen as a method of my business object. It is called in the SkipFor clause of a menu item to bring up the toolbar if the user Hides it. (The latter action I enable thru a command button on the toolbar.) Here's the problem: if the user has clicked the "X" (the one I can't seem to get rid of,) thereby destroying the toolbar, I want the the menu item that would Show it again to be skipped. But the code crashes the app. Here is the code in the lToolbarAlreadyOpen():

LOCAL llRetVal
llRetVal=.T.
IF TYPE('oBenToolbar')='O' && line 3
IF oBenToolbar.visible && line 4
llRetVal=.T.
ELSE
llRetVal=.F.
ENDI
ELSE
llRetVal=.T.
ENDI
RETU llRetVal

If the toolbar has been destroyed, the code third line ("IF TYPE...") evaluates to .T. (i.e. type is 'O') but it crashes on the next line and says that "oBenToolbar is not an object.' How can it be Type 'O' on line 3 and NOT type 'O' on line 4????

Advice on either of these problems would be greatly appreciated.

Thanks!
Jim Wheelock
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform