Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar problems
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00355774
Message ID:
00356080
Views:
11
>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?

Set the toolbar's Closable property to .F.

> 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

Change this to:

IF TYPE('oBenToolbar') = 'O' AND ! ISNULL(oBenToolbar)

> 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!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform