Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing a toolbar cmdbutton from within a form?
Message
From
20/09/1999 11:49:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00266737
Message ID:
00266739
Views:
22
Hi Paul ----

Dunno about MaxFrame, but the best way to do this in general is to assign a Menu item to the function and define the hotkey for the menu item as desired. Then, you can assing the command oToolbars.iaTbrInstances[1,1].cmdSave.click() to the menu item as a Command.


>
>What I want to accomplish, basically, is assign a hotkey to cmdbutton on a toolbar.
>
>I want the end user to be able to hit a function key or some other hot key while in a form and have this fire the click event of a command button on a toolbar.
>
>I was thinking that I could trap the "hot key" in the keypress event of a form and then access the toolbar somehow.
>
>I have Visual Maxframe Pro so I tried accessing the toolbar through the oToolbars object like "oToolbars.iaTbrInstances[1,1].cmdSave.click()". But I have determined that "iaTbrInstances" is protected and so cannot be accessed.
>
>Is there anyway to get the functionality I desire??
>
>Any help would be greatly appreciated.
>
>Thank you,
>
>Paul Acton
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform