From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

UI Interest Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Context based Front Panels

I was working with a customer the other day who had a particularly limited screen space to work with and some large controls to with. I was struck with the thought that many of the controls, as dials, were very useful but only at certain points during hi s use of the application. He would use the dial part when setting a value and hen only refer to the digital display. The UI needed to respond to the way in which he was using the application.

Investigating the concepts back in the office I have come up with this. If you hover over a pane it will grow this to a size that you set. If you exit the pane within a timeout period it will not be affected. This stopped the application looking like it was flashing. This gave me the grounding for a context sensitive UI.

I have included the code for download here

https://bitbucket.org/NIMike_B/ui-context-handler

I have deliberately done this as a repository as I would like others to take this code and tweak it/fix it/play with it and see what they can do.  Have a look at the demo code included so that you can see it in action.

There is an initialisation routine to run and then a Context Handler VI to run in parallel to your code. In your event loop you tell it which splitter to move (by name) and to where. Give it an animation time( time over which it should make the move) and a timeout time. The timeout time will ignore the mouse over for that period of time so that you can move over a pane without resizing it. The reset pane positions calls an absolute move to move a splitter to a set position with no timeout.  You must use the mouse out event to reset the timeout timer as well, not doing this will result in the move being made even if you skip over the pane.

Comments
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

I haven't looked at the code, but from the description this sounds great. I've had in mind to create a similar toolkit that allows for background control of UI components to make LabVIEW front panels more glamorous and current. Much like this! I will be taking a look when I get some time 🙂

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Tricky1234
Member
Member
on

Hi.

I don’t suppose you could save this in the 2012 version?

Regards

Richard

MikeeB
Member
Member
on

I have zipped up the files for a 2012 version

Contributors