I am developing some tools for people with disabilities and I am looking to rotate through the slices/tools on a Radial Menu under program control and to show which tool is currently selected as the program scrolls through the tools. A user with a simple button switch can click it when the item they want is reached on the radial menu, a bit like a sushi train selection.
When you hover a cursor over a radial menu slice it is highlighted with a line displaying between the inner and outer ring; this is what I am trying to achieve under program control however there is no focus property. Is there a means to highlight the slice/tools that is selected under program control.
regards
Doug
Hello Doug,
When you hover with mouse over a particular tool a small arc is drawn over the tool. To set the color of this arc you need to set BorderColor2 of the InnerToolArea. You may use code like this:
// Get the tool you need by the tool's Keyvar highlightedTool = this.ultraRadialMenu1.FindToolsByKey("Tool to highlight").FirstOrDefault();if(highlightedTool != null){ // Set the BorderColor2 of InnerToolAreaAppearance highlightedTool.ToolSettings.InnerToolAreaAppearance.BorderColor2 = Color.Red;}
Please let me know if this is what you are looking for, or if I am missing something.
Truly appreciated. Your suggestion worked perfectly. I have a vb.net environment and scroll through each tool in a For Each loop and as I hit a new tool I can now highlight it and when I reach the next tool I un-highlight the previous tool, so I can now see which tool is available. I now have to finish my test and put some code in to receive a button click to action the highlighted tools.
Once again, a big thank you.
One last question, after I determine what tool has been selected how do I under program control trigger it being clicked? thanks in advance.
After selecting the tool via code, I tried urmMain.PerformAction(Infragistics.Win.UltraWinRadialMenu.UltraRadialMenuAction.ClickCurrentItem) with no luck.
Hi Doug,
Why you need to trigger tool click? If you have some logic in ToolClick event, what you can do is refactor this logic into a method. Then you can call this method from any point of your application, and it will work as if the tool was clicked. You can call the method and from the ToolClick handler, of course.
Actually each tool is represented by its UIElement. They are not a controls and they do not inherit from Control. This is why they do not have Click event. If you do need to simulate click on a tool you need to find the correct UIElement in the tool's UIElmements tree and call PerformClick on it. Depending on the tool types you are using, as well on the tools current visibility, this could be really tricky to implement.
Please let me know if you have any additional questions.
Hi Milko
I am developing an application for use by users who have major physical disabilities with next to no movement ability and unable to use their hands to tap the radial menu. I can now automate the rotation through the tools on the menu and would like the user to be able to have their hand on a big button used by the disabled when the menu rotates to the item that they want ( button such as this https://www.sparkfun.com/products/9181, there are many disability aids)
That is why I am trying to drive the rotation, selection and clicking of the radial menu from code. It would be a lot easier if the menu was a form control with a perform-click feature.
I realise that I am pushing the envelope on what the radiialmenu tool was designed for eventually I want to drive the use of the application with a brain computer interface. You Dean Guida and Jason Beres are aware of this and kindly helped me a few years back when my wife was dying of ALS
Thanks for your assistance, I will struggle and see what I can achieve.
Thank you for your feedback and for link provided.
What happens when the user clicks this big button? If it is firing a click event, you can handle it on application level. In the event handler you can put some custom logic which should call the method to activate the currently active tool. If not, please let me know what happens when this button gets clicked.
Please let me know if I can assist you with any additional information.
I know that I am pushing the envelope in using the Radialmenu control.
I have code that when triggered will start rotating around the slices/tools on the Radialmenu. When the big button is pressed it's click event then stops the rotation on the radialmenu, it also detects the tools that it stopped on. What I have been unable to do, because I am not the world's most gifted programmer is to trigger the radialmeny.toolclick event. I am comfortable with other controls that have a perfomclick or even a raisevent, neither works for me on the radialmenu.toolclick.
You mention some custom logic to call the RadialMenu method, which I assume is the xxxxxxx_toolclick that handles xxxxxxxx.toolclick I have not been able to do that; do you have any samples?
ps: I have also started exploring the use of the winform carousel to achieve the same end. The ability to rotate through a collection of items for a person to select and action. Each item whether it be a radialmenu button tool or carousel item when selected/clicked can be used to speak via my TTS interface predefined phrases or it could start another application or anything else that you can traditionally do with a button click.
pps to explain a little further if a disabled user can press down on a big button (or Mouse click) and hold it, the event such as mouse-down would rotate the radial menu through its slices/tools until the button is released at which point something like the mouse-up event would perform a click on the selected slice/tool. As mentioned I hope to be able (eventually) to do this through the use of a Brain Computer Interface. In some cases where the user cannot continually hold the button down the it can be toggled. Many of the tools will have pre-canned test messages that can be spoken via a tts engine (Microsoft Voice). One of the radial menu slices may reload the radial with other topics to be selected; each menu will have a slice to reload the original menu. if not the Rdaial Menu control possibly this could be achieved with the WinCarousel control. I hope this makes sense to you.
ppps there are many disability aids which I am looking to make use of also. there are some specialized joysticks and trackballs which could be used to navigate the radial menu or carousel; these will be for people with a little more movement ability; if they cannot click the i can add some clicker code to click an item after hovering over it for a predefined period of time.
In the attached sample project, I am showing you how you can simulate tool click action on button click. However, after simulating this action you will need to determine which tool was “clicked”. Then you need to perform the corresponding action.
I think that this adds unnecessary complexity to your application. What you can do instead is call the tool related action in button click event directly, without pass through tool click event.
You can use the same logic for mouse down, mouse up and any other event you may need to handle.
If any additional questions arise, please just let me know
Brilliant, you have given me enough to get on with and I so do appreciate your effort. I now have a bucket full of ideas to proceed with.
Once again thanks for the great support.
At this stage I should close this support ticket and wish you a great weekend.
Take care
ps. I just ran a little test program and using an ultrabutton I made use of the mousedown event to start an automatic rotation through the slices on a radialmenu and then when the tool that I am after is selected the mouseup event stops the rotation and clicks the tool. As mention many of the tools will contain text for feeding to a TTS engine so that disabled person can communicate basic information needs, such as requesting a drink, or I have a headache etc.
Once again, thank you this has opened up a number of possibilities for me.
pps This is a snapshot of my little test program which when the red button is held down it starts rotating through the tools on the radialmenu and when you release the button the selected tool is clicked. I will try and make a little movie of this and post it. At present I am just using the left mouse button on my mouse until I get one of the large buttons. I have just tried to embed a screen image here and not sure if it will work Each of the tools make use of a the speech engine and say a phrase. I will be setting more meaning phrases up in the days ahead. Needless to say I am very happy that I can rotate and select tools all through the simple use one one button.