RadListBox/RadDropDownMenu

6 posts, 0 answers
  1. Alex Peachey
    Alex Peachey avatar
    56 posts
    Member since:
    May 2006

    Posted 17 Dec 2007 Link to this post

    I would like to assign a RadDropDownMenu to a RadListBox. I can't seem to find a way to do this. RadListBox has a "ContextMenu" and "ContextMenuStrip" property but these refer to Winforms versions of a ContextMenu so I can't assign a RadDropDownMenu. I don't see any other properties on the RadListBox like say RadContextMenu like there is on the RadTreeView.

    Am I correct that this functionality is missing? If it is there, how do I go about doing this?
  2. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 20 Dec 2007 Link to this post

    Hi Alex Peachey,

    You are correct - we have yet to implement this functionality. However, for the time being you can use RadDropDownMenu and associate it with the listbox in your code. You have to subscribe to the MouseDown event of the control and add the following code to the handler:

    void radListBox1_MouseDown(object sender, MouseEventArgs e)  
    {             
        if (e.Button == MouseButtons.Right)  
        {  
            radDropDownMenu1.Show((Control)sender, e.X, e.Y);  
        }  

    This will cause RadDropDownMenu to appear every time when the listbox is clicked with the right mouse button.

    If you have any additional questions, please do not hesitate to contact us again.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Alex Peachey
    Alex Peachey avatar
    56 posts
    Member since:
    May 2006

    Posted 20 Dec 2007 Link to this post

    Thanks, that's how I ended up doing it while waiting, but I was hoping it was built in some how. You can consider this a request to add a property like this to not only this item but really I think any control in the WinForms family should be able to have a RadContextMenu property that can take a RadDropDownMenu.
  5. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 21 Dec 2007 Link to this post

    Hi Alex Peachey,

    Thank you for the suggestion.

    The implementation of RadDropDownMenu is logged in our TODO list and probably will be introduced with the next major release of RadControls.

    If you have any additional questions, please contact us.

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Jorge Delgado-Lopez
    Jorge Delgado-Lopez avatar
    82 posts
    Member since:
    Aug 2007

    Posted 13 Jan 2009 Link to this post

    Hello,

    Vista/VS2005/2008Q3 1204

    I haven't been able to solve this problem, did it ever make the release?

    Thanks
    - jorge
  7. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 14 Jan 2009 Link to this post

    Hi Jorge Delgado-Lopez,

    Thank you for writing.

    You can add RadContextMenu to RadListBox by using RadContextMenuManager. Just drag and drop a RadContextMenuManager from your Toolbox to the form, and this will add RadContextMenu property to the RadListBox control. After that you can create and assign RadContextMenu according to your needs.

    Hope this helps, if you have other questions, do not hesitate to contact me again.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready