Hello,
I need to change the colors of an item on my menu to bring attention to it. That part works great. Where I am having trouble is resetting it back to defaults. I am trying to use the resetvalue function to do this? Am I doing this correctly?
With mnuForms
.Image = My.Resources.rejectedForms16x16
.BorderPrimitive.Visibility = ElementVisibility.Visible
.FillPrimitive.GradientStyle = GradientStyles.Solid
.FillPrimitive.BackColor = Color.Red
.ForeColor = Color.White
.ResetValue(FillPrimitive.GradientStyleProperty, ValueResetFlags.Local)
.ResetValue(FillPrimitive.BackColorProperty, ValueResetFlags.Local)
.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local)
.ResetValue(BorderPrimitive.VisibilityProperty, ValueResetFlags.Local)
End With
My code has LOTS of places where it sets-up new menu items, like:
With delMenu.Items
.Add(New RadMenuItem("..section from document", New EventHandler(AddressOf mnuDeleteSectionFromDocument_Click)))
...etc
I am moving it all over to a new version of my app, which is, I think, using a newer verison of the winforms framework.
This code still comiles, but doesn't create the link from the menu item to the address handler, whereas the more long-form approach works just fine:
Dim aMenuItem = New RadMenuItem("test")
AddHandler aMenuItem.Click, AddressOf mnuTest
delMenu.Items.Add(aMenuItem)
Was there a change in the APi, in which case I need to change everything, or is there another way to create all the menu options and their handlers quickly?
Hello!
I am currently using RadGridView for a project my company has me working on. We want to be able to prevent users from setting CellForeColor and CellBackColor to the same values (as seen in the image below). I've tried implementing a check on a variety of different elements to try and catch this case if it happens, but so far I've not had much luck. I guess more than anything I'm wondering which element I should be focusing on in order to catch this when it happens? I've scoured these forums and the rest of the internet and I haven't seen anything similar being asked. Any help is greatly appreciated, even if it's just a point in the right direction!
Best,
Rich
Dear support,
I have a naive question regarding dropdown menu.
I have created a standard Rad MenuBar with four standard menuItems. Some of these menu items will contains multiple sub-menu items and I would like to automatically have a dropdown behaviour when the user pass the mouse hover the corresponding parent menu item.
Is this possible and how ?
Many thanks
Hello.
I'm leaving you a question because I need your help.
Is there a way to run multiple windows of the same menu? Just like below.
* Menu Example
--------------------------------------------------------------------------------
A MENU | B MENU | C MENU
--------------------------------------------------------------------------------
B Sub Menu | B Sub Menu | B Sub Menu
--------------------------------------------------------------------------------
Code for generating the menu currently in use.
* CODE
var menuList = MenuList.List.Where(x => x.DISPLAY_FLAG.Equals("Y"));
foreach (FT_MENU_INFO menu in menuList)
{
if (string.IsNullOrWhiteSpace(menu.PARENT_MENU_CD)
|| menu.MENU_CODE.Equals(menu.PARENT_MENU_CD))
{
var item = new RadMenuItem { Text = menu.MENU_NAME };
item.Padding = new Padding(0, 0, 3, 0);
item.ClickMode = ClickMode.Press;
item.ShowArrow = false;
item.Visibility = ElementVisibility.Visible;
var subMenuItem = menuList.Where(x => x.PARENT_MENU_CD != null && x.PARENT_MENU_CD.Equals(menu.MENU_CODE)).ToArray();
for (int i = 0; i < subMenuItem.Length; i++)
{
RadMenuItem subMenu = new RadMenuItem()
{
Text = subMenuItem[i].MENU_NAME,
Name = subMenuItem[i].MENU_CODE
};
subMenu.Click += Menu_Click;
item.Items.Add(subMenu);
}
this.radMenu.Items.Add(item);
}
}
We use the same shortcut key in different places, where they can be in the general RadMenuItem but also on a menuitem in a RadContextMenu tied to a text box.
But, when i am focused on the text box and hit F12, it fires the radmenuitem F12 shortcut and never fires the contextmenu option. The ZIP file has the program that shows this.
Within windows using the standard menu and context menu, the context menu shortcut is fired and not the general menu shortcut. Windows seems to be treating it as you are on this field and there is a context menu with this shortcut - fire that event. Whereas Telerik seems to be looking at the general menu before the context menu.
Am i doing something wrong to get the context menu shortcut to fire and not the general menu shortcut?
This happens on both a RadMenu and a RadContextMenu.
I have a contextmenu tied to a text box. THere are 2 items on the context menu. One is defined as RadMenuItem, one is defined as cMyMenuItem.
My Code:
Public Class cMyMenuItem
Inherits Telerik.WinControls.UI.RadMenuItem
Sub New()
End Sub
End Class
Now, when the program is run, the menu item defined as RadMenuItem is fine, but the one defined as cMyMenuItem has a heavy border around it.
What do i need to setup in my class so the border isn't there.
I have an MDI RadForm with several Menu Items (File, Window, Help etc.)
When I open a new child window the Child Menu (Search) is put up in the MDI Menu but in the last position.
Can I change it to be placed between Window and Help?
I have other Child Form Menu's I would like to do this with as well.
I didn't see how I could order them (Event etc).
Thanks