Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar
Message
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00803103
Message ID:
00803122
Views:
13
This message has been marked as the solution to the initial question of the thread.
I use the following syntax for application toolbar
oApp.oTopToolBar = createobject( "appl_toolbar" )
oApp.oTopToolBar.Dock(0)
oApp.oTopToolBar.Visible = .T.
oApp.oTopToolBar.show()
where oApp is a public variable referencing application object.

Therefore, you can enable/disable button of the toolbar from wherever you wish:
oApp.oTopToolBar.cmdCopy.enabled = .F.  && or .T.
As far as using toolbar inside a form, I have not tried it but I suppose you can reference a toolbar to a form property.

HTH


>I have a docked (class) toolbar on the top of my app
>
> Some buttons of the toolbar will cause problems if pressed
>when a form is open
>
>1- Is there a easy way to disable a button of the toobar
>when a form is open ?
>
>2- Is there a way for a form to call its own toobar and
>disable other ?
>
>3- Is it possible to put a toolbar iside a form ?
>
>Using VFP 6.0
>
>TIA
>
>Moses
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform