CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: drop down menu

  1. #1
    Join Date
    Mar 2004
    Posts
    339

    drop down menu

    I cannot find any drop down menu in the Window Form Toolbar, I would like to know how to add a drop down menu in my C# application program?

    Thank you

  2. #2
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    Re: drop down menu

    In 2005 it is built in.
    In 2003 you will need to add the combo yourself to the ToolBar:
    Code:
    ComboBox cmb = new ComboBox();
    myToolBar.Controls.Add(cmb);

  3. #3
    Join Date
    Mar 2004
    Posts
    339

    Re: drop down menu

    Thank you for your help.

    It works!! But since i use GUI view to design my application program, once i used the coding to add the window component, the position of the drop down menu will overlap with other window component. Also, i cannot find the InitializeComponent(); even there is a line for calling such method.

    I would like to know where i can view the code of InitializeComponent(); and how to control the position of drop down menu?

    Thank you

  4. #4
    Join Date
    Nov 2004
    Posts
    105

    Re: drop down menu

    Use Contexmenu at desing time It will be better, And add That Context menu to the ToolBar button to which button You need Drop button.

    http://msdn.microsoft.com/library/de...rogramming.asp

    Regards
    Ravi

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

Featured