|
-
Apr 19th, 2005, 07:05 AM
#1
Thread Starter
Hyperactive Member
toolbar buttonmenu problem
i have a toolbar associated with an imglist. i have 5 images dislayed, i've sorted out the events, everything works great, but.
I want to have a submenu on one of the buttons. looking at the custom dialog for the toolbar, there is a section that allows you to insert and remove buttonmenu's, i assumed that by adding button menus i would then be able to run the app click on the toolbar button that has the submenu and it would display my submenu option. does it b*ll*ks. it doesn't do anything.
can someone tell me, or point me in the direction of a tutorial that explaisn how to get buttonmenus working with a toolbar. i've googled, i've searched this forum, i can find nothing.
any help would be much appreciated
-
Apr 19th, 2005, 07:27 AM
#2
Re: toolbar buttonmenu problem
-
Apr 19th, 2005, 07:40 AM
#3
Thread Starter
Hyperactive Member
Re: toolbar buttonmenu problem
yep already looked at those and they didn't help me.
what i want to know is:
why when i've added a buttonmenu does it not display when i click on the button at runtime?
do i need to add some code to make the buttonmenu display?
when i've got the buttonmenu to display, how do i capture the click event?
(altho i think i know this one Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu))
-
Apr 19th, 2005, 08:22 AM
#4
Re: toolbar buttonmenu problem
 Originally Posted by sagey
(altho i think i know this one Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu))
This much I do know, and this is the event you would code, i.e.
VB Code:
Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As ComctlLib.ButtonMenu)
Select Case ButtonMenu.Index
Case 1
'do something
Case 2
'do something else
End Select
End Sub
Let me see what I can find on the dropping down part.
-
Apr 19th, 2005, 08:26 AM
#5
Re: toolbar buttonmenu problem
Got it!
On the property page of your toolbar, find the button that you wish to add a drop down menu to.
Set the Style to: tbrDropDown
In the "Button Menus" frame, click on "Insert Button Menu"
In the Text box put what you want to appear as a caption on the drop down menu.
Run your program. Next to the button that you added the menu to, you will see a "down arrow". Click on the down arrow, and your dropdown menu will appear.
-
Apr 19th, 2005, 09:51 AM
#6
Thread Starter
Hyperactive Member
Re: toolbar buttonmenu problem [resolved]
yep just found out, from my collaguea (rather embarrasing) that i needed to select the dropdown type of button.
thanks for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|