05-14-2014 08:15 AM
Hi everybody!
I have got a question that is a little bit strange maybe...
I want to write a program to simulate the on-screen-behavior of a camera control unit (like a remote control with the buttons: up, down, left, right and enter). The focus is set on how the menu guidance works (e.g. what happens if I press enter while the menu point xx is selected…).
Therefore I have to visualize many menus and submenus like the once you see if you change settings on your home TV.
The only way I figured how to manage this task, is to create a picture ring with all different menus and menu settings as pictures and to navigate with an event structure.
But that’s very tough and time consuming because I have to create a hell of a case structure in every event to cover all the pictures (e.g. if I press enter on picture 20 go to picture 5, if I press right on picture 20 go to picture 35…).
Is there any other way to do this?
Thanks for your help and I hope my question is not too opaque
05-14-2014 12:44 PM
Using tabs will probably help but you will likely have a similar issue. You can have logic that says if you are on page "Initialize Settings" and the right arrow key is pressed, then go to the menu "Current Settings" or something. Then you need to define what each tab does, and how menues move around that one tab.
A similar approach can be used with subpanels but tabs will work fine.
Another fun solution would be to replace the whole UI with just a single 2D picture control. Then write the code that redraws the picture of your menu. Again you'd need logic to keep track of your current position, and what to do when each of the buttons are pressed. Much less fun, but I like seeing 2D picture controls used in non-conventional ways.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-15-2014 01:07 AM
Thanks for your reply!
But overall what you are saying is, that there is now way to shorten this whole thing drastically?
I already have the VI working with my picture ring solution but the problem is if i want to change a little thing just by adding another 'back' button somewhere I have to change roughly 40 different integer case structures. And if somebody else had to change or add something while I am not around they just don't stand a chance
I guess that would be the same if i used tabs or the 2D picture control, right?
05-15-2014 08:18 AM
@jobauer wrote:
Thanks for your reply!
But overall what you are saying is, that there is now way to shorten this whole thing drastically?
I already have the VI working with my picture ring solution but the problem is if i want to change a little thing just by adding another 'back' button somewhere I have to change roughly 40 different integer case structures. And if somebody else had to change or add something while I am not around they just don't stand a chanceI guess that would be the same if i used tabs or the 2D picture control, right?
LabVIEW is a programming language. It doesn't do the work for you, you program it to do what you want. There is nothing out of the box that will simulate UI navigation with button presses. There are many ways to implement this some easier then others, and some easier to modify then others. I think a tab/subpanel approach would be more scalable but it also would have work involved in adding new naviation options.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-16-2014 06:16 AM
just wanted to know if i had missed something...
05-16-2014 10:24 AM
Since you don't show an example of what you actually want it to look like, it's hard to say, but if you want a grid, there is an easier way - simply create a 2D array of "buttons". These buttons can be pictures or clusters with a color box background, a picture for an icon and a string for text or any other option you want. You then need to track where you are and use the value of the color box to highlight the relevant element. The main shortcoming of this method is that all elements have to be the same size.