ToolBar Button Menu Key? 
Author Message
 ToolBar Button Menu Key?

How do I set the case for a button menu sub item

I have added keys to the sub items on the button but case
will not pick them up

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error Resume Next
    Select Case Button.Key
        Case "Key1"
            MsgBox "Add 'Key1' button code."
        Case "Key1Sub1"
            MsgBox "Add 'Key1Sub1' button code."

    End Select

End Sub



Sun, 20 Jan 2002 03:00:00 GMT  
 ToolBar Button Menu Key?
Works like this incase anyone wants to use it

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

    On Error Resume Next
    Select Case Button.Key
        Case "Button1"
            MsgBox "Add 'Left' button code."

    End Select

End Sub

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As
MSComctlLib.ButtonMenu)
   Select Case ButtonMenu.Key
        Case "Button1Sub1"
            MsgBox "Add 'Button1Sub1' button code."
        Case "Button1Sub2"
            MsgBox "Add 'Button1Sub2' button code."
        Case "Button1Sub3"
            MsgBox "Add 'Button1Sub3' button code."
        Case "Button1Sub4"
            MsgBox "Add 'Button1Sub4' button code."
   End Select
End Sub

========================


Quote:
> How do I set the case for a button menu sub item

> I have added keys to the sub items on the button but case
> will not pick them up

> Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
>     On Error Resume Next
>     Select Case Button.Key
>         Case "Key1"
>             MsgBox "Add 'Key1' button code."
>         Case "Key1Sub1"
>             MsgBox "Add 'Key1Sub1' button code."

>     End Select

> End Sub



Sun, 20 Jan 2002 03:00:00 GMT  
 ToolBar Button Menu Key?

thoughts were released on Wed, 4 Aug 1999 02:09:24
-0400 bearing the following fruit:

Quote:
>How do I set the case for a button menu sub item

>I have added keys to the sub items on the button but case
>will not pick them up

ToolBar_ButtonMenuClick

Drac



Sun, 20 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Control Keys vs Menu and Toolbar items

2. Simultaneously pressing a key and mouse-clicking a button on a toolbar

3. Mouse-clicking a button on the toolbar whilst holding down the Shift key

4. Toolbar button caption does not support ALT keys

5. Active/Inactive toolbar buttons/menu commands

6. Responding to Menu items and Toolbar buttons

7. Transparent images in toolbar button/menu ?

8. Click-Event for runtime-built Toolbar Button Dropdown Menu

9. Controls on a form (including menus and toolbar buttons)

10. Simulating toolbar button click through menu item?

11. Methods for linking menu items and toolbar buttons?

12. Avoiding duplicate code in menus and toolbar buttons

 

 
Powered by phpBB® Forum Software