This is a migrated thread and some comments may be shown as answers.
RadListBox/RadDropDownMenu
5 Answers 109 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex Peachey
Top achievements
Rank 1
Alex Peachey asked on 18 Dec 2007, 12:52 AM
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?

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 20 Dec 2007, 12:12 PM
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
0
Alex Peachey
Top achievements
Rank 1
answered on 20 Dec 2007, 07:25 PM
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.
0
Georgi
Telerik team
answered on 21 Dec 2007, 04:37 PM
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
0
Jorge Delgado-Lopez
Top achievements
Rank 1
answered on 14 Jan 2009, 02:51 AM
Hello,

Vista/VS2005/2008Q3 1204

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

Thanks
- jorge
0
Martin Vasilev
Telerik team
answered on 14 Jan 2009, 12:52 PM
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.
Asked by
Alex Peachey
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Alex Peachey
Top achievements
Rank 1
Jorge Delgado-Lopez
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or