Click to See Complete Forum and Search --> : short cut keys for toolbars
Sheryl M
June 15th, 2001, 04:01 AM
I used a toolbar control as buttons. The problem is unlike the command buttons, it does not support the shortcut key using ampersand. Is it possible to assign a shortcut key to the buttons i've used in my toolbar control? If yes, how? Thanks. Hope you can help me.
Tower
June 17th, 2001, 07:48 PM
Create menu with function as toolbar button. Give this menu needed shortcut key and all :)))
Sheryl M
June 17th, 2001, 08:32 PM
i cannot use the menu because i am using images for the buttons. is there another way to create shortcut keys for the toolbar button?
Simonkale
June 17th, 2001, 08:56 PM
Toolbar, itself is a shortcut for menu items. There are two shortcut ways to access menu.
1)through Toolbar
2)through shortcut like CTRL+N
If you want to create shortcut(CTRL+N) for toolbar "NEW" then you must have a menu item "NEW". I don't think there is another way.
Tower
June 17th, 2001, 09:21 PM
I don't understand you. All program only dublucate command from menu on toolbar. Create menu and shortcut. Create toolbar and call function.
1. Create menu "Test" in menu editor.
2. Give shortcut for this menu
3. Create toolbar and button.
4. Insert code
private Sub Test_Click()
TestSub
End Sub
private Sub Toolbar1_ButtonClick(byval Button as MSComctlLib.Button)
If Button.Index = 1 then TestSub
End Sub
private Sub TestSub()
MsgBox "All work"
End Sub
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.