Results 1 to 7 of 7

Thread: [RESOLVED] open button menu in toolbar when click in ALL the button, not only in the small arrow

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    92

    Resolved [RESOLVED] open button menu in toolbar when click in ALL the button, not only in the small arrow

    please see the image:


    the menu in the button is opened with click in the small down arrow, but NOT if click in the button image.
    please is there possible?

    I've tested the tbar_ItemClicked event, but dont found any help.

  2. #2

  3. #3
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: open button menu in toolbar when click in ALL the button, not only in the small a

    Look at the ShowDropDown method.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    92

    Re: open button menu in toolbar when click in ALL the button, not only in the small a

    Quote Originally Posted by NickThissen View Post
    Isn't that a ToolStripSplitButton? I think you should use a ToolStripDropdownButton instead if you want that behavior.
    I don't understand why there are two as similar controls?
    I've used Split and not the other for none reason.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    92

    Re: open button menu in toolbar when click in ALL the button, not only in the small a

    Quote Originally Posted by ForumAccount View Post
    Look at the ShowDropDown method.
    Thanks, it's OK.
    but this event is not accesible using e. or sender, thus you need to type the control name.

    but works.

  6. #6
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: [RESOLVED] open button menu in toolbar when click in ALL the button, not only in

    Or you can cast sender to the actual control type then call the method, but using a split button like that isn't what you want anyways, I would use the ToolStripDropdownButton instead
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  7. #7
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: open button menu in toolbar when click in ALL the button, not only in the small a

    Quote Originally Posted by Guerrero View Post
    I don't understand why there are two as similar controls?
    I've used Split and not the other for none reason.
    Why wouldn't there be? They're similar but not exactly the same. A ToolStripSplitButton is intended as a button that, optionally, also has a number of 'child' buttons. A ToolStripDropDownButton only has child options and the 'parent' button is not intended to be used as a real button.

    I could just as well ask you why there are similar controls such as a CheckBox and a RadioButton. They look similar but behave completely different. Similarly: a Button or a CheckBox with its Appearance set to Button. They look exactly the same but again behave completely different.

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