LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Menu guidance/navigation

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 Smiley Wink

0 Kudos
Message 1 of 6
(2,392 Views)

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.

0 Kudos
Message 2 of 6
(2,368 Views)

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 Smiley Frustrated

I guess that would be the same if i used tabs or the 2D picture control, right?

0 Kudos
Message 3 of 6
(2,351 Views)

@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 chance Smiley Frustrated

I 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.

0 Kudos
Message 4 of 6
(2,334 Views)

just wanted to know if i had missed something...

0 Kudos
Message 5 of 6
(2,312 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(2,302 Views)