Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar Button & Button Menu

Status
Not open for further replies.

marble

Programmer
Mar 17, 2001
22
0
0
CA
Hi,

I have a question about vb's toolbar button menu.

I have a button menu on a toolbar that drops down the menu when you click on the arrow portion of this button.

However, I would like to force the dropdown menu to appear when a user clicks on the button portion of the buttonmenu button.
____________
| | |
| | \/ |
|_______|____|


I would like to take this opportunity to thank everyone in advance for any help!

Thankyou

marble
 
If you go to properties of the Toolbar, and go to the Buttons tab, change the Style option to 5-tbrDropdown

Good Luck!
 
Hi,

Sorry for the confusion. I do have a dropdown menu created called "DirList" and I have added the submenu items for the dropdownlist.

However, my problem is this, the user has to click on the arrow portion of the button so that the menu will appear, if the user selects the button to the left of the arrow, nothing happens.

My toolbar code is below...

Select Case Button.key
Case "Start" ' start stop
mnuFileMnu_Click 0
Case "Stop"
mnuFileMnu_Click 0
Case "Browse" 'select directory
mnuFileMnu_Click 2

Case "Save"

Case "Clear"
txtLog.Text = ""
Case "Reports"
mnuViewSub_Click 0

Case "Exit"
mnuFileExit_Click
Case "Help"
mnuHelpSub_Click 0

Case "DirList"
'what code can I place code in here so that when the user selct this button, the drop down menu appears.
End Select



My buttonmenu sub is below... This works okay....

Private Sub tbWatch_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)

If ButtonMenu.key = "None" Then Exit Sub
If FileExists(ButtonMenu.key) Then
m_sWatchedDir = ButtonMenu.key
txtDirectory.Text = m_sWatchedDir
mnuFileMnu_Click 0
End If
End Sub


Is this a bug in vb or do I have to called the sub ....

Private Sub tbWatch_ButtonDropDown(ByVal Button As MSComctlLib.Button)
' I do not know what to place here to foce the menu to appear

End Sub


Thankyou in advance for your help....

Marble
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top