Lloyd McDonald
Top achievements
Rank 1
Lloyd McDonald
asked on 04 Aug 2008, 03:13 PM
Hello,
I'm having difficulty getting a context menu to expand to the width of the current node's text. The tree view's context menu in your examples solution always expands to the width of the menu item's text, but I could not find any references where the width of the context menu or its items is explicitly being set.
I'm also using the same jscript function: setMenuItemsState to set the menu item's text.
Please advise.
I'm having difficulty getting a context menu to expand to the width of the current node's text. The tree view's context menu in your examples solution always expands to the width of the menu item's text, but I could not find any references where the width of the context menu or its items is explicitly being set.
I'm also using the same jscript function: setMenuItemsState to set the menu item's text.
Please advise.
7 Answers, 1 is accepted
0
Accepted
Hello Lloyd,
Could you, please, try to set the width of the first item of the context menu? If this doesn't help, please, send us sample code illustrating the problem, so we can test it locally?
Kind regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Could you, please, try to set the width of the first item of the context menu? If this doesn't help, please, send us sample code illustrating the problem, so we can test it locally?
Kind regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Lloyd McDonald
Top achievements
Rank 1
answered on 11 Aug 2008, 09:33 PM
Yana,
That did the trick!
Thanks.
That did the trick!
Thanks.
0
Carl-Johan
Top achievements
Rank 1
answered on 12 Oct 2008, 07:37 PM
I have the same problem, I use a web.sitemap. How do I do it.
Thanks
Carl-Johan Larsson
Thanks
Carl-Johan Larsson
0
Hello Carl-Johan,
You can use the following style to set the width of the context menu:
Kind regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use the following style to set the width of the context menu:
<style type="text/css"> |
.rmFirst { |
width: 200px !important; |
} |
</style> |
Kind regards,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Carl-Johan
Top achievements
Rank 1
answered on 14 Oct 2008, 06:44 PM
So simple, thanks.
Carl-Johan Larsson
Carl-Johan Larsson
0
abhay
Top achievements
Rank 1
answered on 05 Jan 2012, 07:34 AM
Hello,
I'm facing the same problem... I have given a width to the first item in the context menu but I can see a gapping in the context menu on mouse hover. Can we set the width of the context menu depending on the tree node text width?
Regards,
Abhay
I'm facing the same problem... I have given a width to the first item in the context menu but I can see a gapping in the context menu on mouse hover. Can we set the width of the context menu depending on the tree node text width?
Regards,
Abhay
0
Hi Abhay,
The issue that you encounter is due to the width of the menu item. Since the text of the ManuItem is very long and the sprite image of the menu is not long enough (simply not designed for items containing long text) you get the gap that appears on the image. Therefore you can either shorten the item's text or alter the sprite image that is applied as a background to the RadContextMenu (as described in this help article).
Regards,
Kate
the Telerik team
The issue that you encounter is due to the width of the menu item. Since the text of the ManuItem is very long and the sprite image of the menu is not long enough (simply not designed for items containing long text) you get the gap that appears on the image. Therefore you can either shorten the item's text or alter the sprite image that is applied as a background to the RadContextMenu (as described in this help article).
Regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now