Results 1 to 6 of 6

Thread: [RESOLVED] NonModal ContextMenuStrip?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    477

    Resolved [RESOLVED] NonModal ContextMenuStrip?

    I have a context menu that the bottom option opens a popup UserControl (UC) on Mouse_Enter, I would like to keep the contextmenustrip(CMS) open until the user picks an option from the UC. However the default behavior of a CMS is modal, so I cannot interact with the UC. Is there any way to keep the CMS open and still be able to interact with the UC or is my only option to create another UC to be a pseudo CMS?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,130

    Re: NonModal ContextMenuStrip?

    You should create a custom ToolStripItem that contains your user control and then it can be displayed as part of the menu itself, just like any other menu item. Or are you saying that that's already what you're doing?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    477

    Re: NonModal ContextMenuStrip?

    Thanks for the reply. I ended up being able to get it how I wanted it to look using a custom ToolStripProfessionalRenderer Class and just painting it how I wanted and using several images.

    Thanks again for the response.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,130

    Re: NonModal ContextMenuStrip?

    If your issue is resolved then please use the Thread Tools menu to mark the thread Resolved. That way, everyone can see that you don't need further help without wasting time opening and reading the thread.

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    24,033

    Re: NonModal ContextMenuStrip?

    Quote Originally Posted by jmcilhinney View Post
    You should create a custom ToolStripItem that contains your user control and then it can be displayed as part of the menu itself, just like any other menu item. Or are you saying that that's already what you're doing?
    It's the ToolStripControlHost class you were referring to...

  6. #6
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,130

    Re: NonModal ContextMenuStrip?

    Quote Originally Posted by .paul. View Post
    It's the ToolStripControlHost class you were referring to...
    That sounds reasonable. I've only ever used on in a ToolStrip but I imagine that they would work in a ContextMenuStrip as well.

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