Results 1 to 6 of 6

Thread: toolbar buttonmenu problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: toolbar buttonmenu problem


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    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))

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: toolbar buttonmenu problem

    Quote 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:
    1. Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As ComctlLib.ButtonMenu)
    2.    Select Case ButtonMenu.Index
    3.    Case 1
    4.       'do something
    5.    Case 2
    6.       'do something else
    7.    End Select
    8. End Sub
    Let me see what I can find on the dropping down part.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    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
  •  



Click Here to Expand Forum to Full Width