iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Is there a way to enable kayboard navigation in the WebMenuBar? (Like it's possible with the WebTreeView).
Thank you.
Hi,
Actually you can set access key for every command in WebMenuBar. You can also use keyboard to navigate between the command. You can check our WebDesktopSamples>>WebMenu>>MenuBarWithAccessKey.aspx.
Best Regards,
Gordon Tumewu
Gordon,
Thank you for your response. This method works great if I have one MenuBar on the page. In our setup, I have to assign the access keys dynamically, so if I have multiple menu bars on one page, the first item for all of them will have the access key 'a'. I tried this scenario, and I cannot get the second menu's items to expand even if it is initially selected. So basically, my question is, how can I operate this feature in a dynamic environment (sharepoint web parts), where I don't know how many menu bars I will have on the pge, and the access keys are assigned dynamically, starting with 'a'.
Thank you,
Dasha Fedorova
Hi Dasha,
I am sorry but I am not fully understand with your requirement. Do you want to set the access key and add the menu programmatically? If yes, try to use the following code:
protected void Page_Load(object sender, EventArgs e) { MenuCommand cmd = new MenuCommand(); cmd.Name = "item1"; cmd.Text = "item1"; cmd.AccessKey = "a"; WebMenuBar1.Menus.Add(cmd); }
My problem is that if I have more than one (multiple) WebMenuBars on the page, and they happen to have repeating access keys, then only the first menu bar reacts to the Alt+a, and there's no way to expand the second menu bar's item with the same access key. Try putting two web menu bars on the page, and give their menu commands matching access keys. So the first web menu bar will have 3 menu commands with access key a, b, c, and the second one will have the same - 3 commands with a, b, c. Only the first web menu's commands will expand. It doesn't really matter if the commands are added programmatically or not. What's more important is that the WebMenuBars are added dynamically, and there's no way of knowing how many are on the page, or what are the assigned access keys for the menu commands.
Hopefully this explains my problem better..
Dasha.
Thanks for the explantion. I understand why you cannot use the access key. Looking at the first requirement that you want to have keyboard navigation like WebTreeView, actually the menu bar also have keyboard navigation, here I attach demo video of keyboard navigation in WebMenuBar, I only use the directional key in my keyboard to navigate between the menu.
Please let me know if this suitable with your scenario.
Thank you for this example. I see that you click the web menu bar to begin using the keyborad navigation. Is there a way for me to tab into the web menu bar and begin expanding items? I was looking at our online sample, and I can't expand any items using the arrow navigation.
To enable tab into WebMenu, you need to set ShowFocusBorder property to True in WebMenu's property. Also once you have focus on one of the item, you just need to press the arrow navigation, then the menu will expand.
I'm still unable to expand WebMenuBar's MenuCommands by tabbing into the WebMenuBar. Once I mouse-click a MenuCommand, the items expand just fine, and I'm able to use the arrow keys to navigate the MenuCommands. But how can I expand the MenuCommand initially without using my mouse? We're trying to achieve 508 compliance in our product, so this ability is pretty critical.
Thank yo for all your help,
Actually once you have tab the menu command by tabbing, then after the menu command got focussed, you just need to use the down navigation arrow of your keyboard to expand.
If you cannot expand the menu command using the down navigation arrow of your keyboard, could you inform me your WebDesktop and Framework build version?
We're using 2009R1 SP1. We're also using a javascript workaround that you guys gave us some time ago that allows us to expand items on mouse-over and then close tham after a set time. This was issue IS-190EC4BC-463E-4440-9735-48560DDF86FD, so you can look it up.
Here I attached my complete simple sample. Could you try to run it at your end and let me know whether you can expand the menu using down navigation arrow.
Thank you for this example. I see that when you initially tab into the menu, the whole thing is selected, and then you press tab again, and the individual menu command is selected. This is not happening in the SharePoint environment for some reason. I tab over the menu bar, and it gets selected, but clicking Tab again, moves to the next control on the page instead of the individual menu command. Can you please try your example in a SharePoint environment to see if you can replicate?
Gordon, just an update to my issue. I've discovered that it's occurring when the items are created dynamically in codebehind rather than in the html. So that's why your example works, and mine environment doesn't. It has nothing to do with SharePoint, but rather in the way the items are created - dynamically versus statically. Try creating items like this:
protected void Page_Load(object sender, EventArgs e){MenuCommand cmd = new MenuCommand(); cmd.Name = "item1"; cmd.Text = "item1"; cmd.AccessKey = "a"; WebMenuBar1.Menus.Add(cmd);}
And then try to expand them by using the keyboard - it will not work.
Thank you for helping me with this,
d.
Thanks for the update, our support member Yudi still working on this issue. He will inform you once we have found the solution.
Thanks.
With Yudi's help we've figured out that the keyboard navigation by way of tabbing only works when the access key is defined in the Menu Commands. I've gone around this by setting the access key string to be something like 'non empty string', but now I get a tooltip when i hover over the menu commans: "(Alt + non empty string)" how can I remove this tooltip?
Thank you for your help,
You can turn off the tooltip by setting the DisplayToolTip property to False. Or you can change the content of the tooltip at
<ISWebDesktop:WebMenuItem AccessKey="n" Name="mnuNewWindow" Tooltip="Test" OnClick="NewWindow" Text="New Window">
Hope this helps.
Gordon, this is what i'm doing in code:
MenuComand.Text = "Test Value";
MenuComand.ToolTip = "ToolTip Text";
And what I see is in the attached image. If possible, give us a responce as soon as you can, since this has been a very long outstanding issue, and it's important for our release that's taking plase in the next few days. Thank you so much for all the help!
If you dont want to show the tooltip, you can set the DisplayToolTip property to No. Here is the complete code:
MenuCommand MenuComand = new MenuCommand(); MenuComand.Text = "Test Value"; MenuComand.Name = "UniqueID"; MenuComand.AccessKey = "non empty value"; MenuComand.ToolTip = "ToolTip Text"; MenuComand.DisplayToolTip = DisplayToolTip.No;
but what if i want to see the tooltip, but not the (Alt + "") hint?
I am sorry for the time that we have to give you the right solution. After checking the properties, I found the property to remove the access key from the tooltip. This is the complete code:
MenuCommand MenuComand = new MenuCommand(); MenuComand.Text = "Test Value"; MenuComand.Name = "UniqueID"; MenuComand.AccessKey = "non empty value"; MenuComand.ToolTip = "ToolTip Text"; MenuComand.DisplayAccessKeyOnToolTip = DisplayAccessKeyOnToolTip.No;
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname