ToolBar Question

ahgao2
03-12-2003, 09:49 AM
Hi all I have a problem with an interface design. I was playing around with the interface of my program and I have added a toolbar into my form and I have a 'New' button with sub-buttons like 'Romance', 'Complain'.

The codings produced by Visual Basic is as follow below

Private Sub tbMenu_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error Resume Next
Select Case Button.Key
Case "btnNew"
'ToDo: Add 'New' button code.
MsgBox "Add 'New' button code."
Case "btnComplain"
'ToDo: Add 'New' button code.
MsgBox "Add 'Complain' button code."
Case "btnRomance"
'ToDo: Add 'New' button code.
MsgBox "Add 'Recommend' button code."
End Select
End Sub

The btnComplain and btnRomance are the sub-buttons of btnNew but the codings only works for btnNew. Do I have to create another Select-Case statement to manage the sub-buttons too?

Machaira
03-12-2003, 10:56 AM
If you mean btnRomance and btnComplain are ButtonMenu items (as in the attached picture) then use the ButtonMenuClick event.

ahgao2
03-12-2003, 11:03 AM
Thanks a million! Now it works! :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum