LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Matthias_H

Advanced positioning of frontpanel elements

Status: New

The frontpanel editor of LabVIEW is suboptimal.

 

It's not possible to create frontpanels which resizes well when resizing the application window.

I need a feature which every classic programming language supports (C#, Delphi, ...): The definition of align (and anchors) of every frontpanel element including the decoration elements.

 

In LabVIEW there is only a very bad VI setting to resize/scale the frontpanel, but I don't know anyone who likes this behavior.

 

Maybe later I'll post some screenshots but now a few examples without screenshots.

 

Examples for anchors

 

I want to place a firm logo in the top right corner of the frontpanel. Now there should be an option to set the anchors "top" and "right" to "true" and "left" and "bottom" to false". Now the logo must have a constant size and a constant relative position from the top and right side when resizing the application window.

 

Or let's take a table:

If I set its anchors "left", "top" and "right" to "true" ("bottom" is "false") the width of the table will be increase when increase the width of the frontpanel. Changing the height would not affect the table, because the anchor of "bottom" is "false".

 

Example for align

 

I want to define a section on the frontpanel to show some status information. If I set "align" to "bottom", the section (maybe a decoration rectangle) should stick to the bottom of the frontpanel. And the width should be the same as the one of the frontpanel.

 

Align is not as important as the anchors feature because you can replace the align behavior with anchors.

If you set the anchors of the rectangle to "left", "bottom" and "right" ("top" is "false"), the rectangle also stays at the bottom if it was placed there in the frontpanel.

 

I hope the explanation is clear. If not please tell me. I'll try to make some screenshots.

8 Comments
ASInc
Member

There is SOME capability of doing essentially what you're looking for through creative use of splitters.

 

You can lock a group of controls to the left edge, a different group to the bottom edge, and have a graph that resizes with the window at the top right, for example.

 

It is possible to set the sizing and color of the splitters such that they are invisible at run time. 

 

I have built a program using LabVIEW that uses exactly this technique to manage its resizing.

Matthias_H
Member

Thank you, but I know about the splitters.

 

The problem is that splitters are very very unflexible and the maintainability of the application is bad.

And I don't want to have this behavior over the whole width or height. Everybody who uses languages like C# knows, how important the anchor feature it is for professional GUIs.

 

I talked to NI employees and they agreed with me that there is no good possibility to create resizable frontpanels.

ASInc
Member

I just used multiple splitters to achieve a different effect for a given area.

 

DMCsplitters.PNG

 

The green lines are where my splitters are. 

 

Area 5 is locked in height, and Locked to the bottom edge of the window.  Scales horizontally with the window.

Area 4 is locked in height, and Locked to the top of area 5, and the left of area 4 is locked to the right of area 3.  Scales horizontally with the window.

Area 3 is locked in height and width, and locked to the top edge of area 5.

Area 2 scales horizontally and vertically with the window.

Area 1 is locked in width, and to the top of the window.  The controls do not scale, so as the window gets taller, blank space appears between area 1 and area 3, while the graph in area 2 gets taller.

 

 

Could you not do something like that?

Matthias_H
Member

Thank you for the explanation.

 

It's uncomfortable, but I'll try it tomorrow. An easier configuration of the anchors would be great.

elset191
Active Participant

I think I've just run into a spot where splitters won't cut it.

test.PNG

This is the top right of my panel.  Note the hide/show buttons for the graphs.  I have the graph to grow with the panel, which works fine, but the buttons never do what I want them to.  If I group the graph and the buttons it looks like this when it's maximized:

test.PNG

If they're not grouped it just looks like

test.PNG

Obviously, I want the buttons to stick to the side of the graph legend.  If I could anchor the buttons and the graph to the top right it would work. 

 

Any one know of a way I can accomplish this?

--
Tim Elsey
Certified LabVIEW Architect
Matt_W1
Active Participant

The only way I know is have an event for the pane size andto move the buttons to the proper place, using the legend postion property of the graph.

ASInc
Member

That would probably work well, despite being a bit kludgey.  It would be really nice to have better control over the position of things than we do now. 

sletrab
Member

Hello Matthias H,
I feel your pain.
Nowadays there are a lot of monitor resolutions. It's very unprofessional to distribute an aplication for only 1 Monitor resolution. And the facilities of LabVIEW in this area are insufficient.
You have to code the resizing every time by hand and you can not concentrate on the real work:
1. No achor to Frontpanel Borders or borders of other Controls.
2. LabVIEW stores the position of Controls intern in integer (not double)
3. The properties to resize a Control are different for every Control
4. If you read the Control dimensions Labels and Captions are part of the dimension size
5. ...
I can not understand why NI do not start to improve LabVIEW in this area.
Do other developer have no frontpanels?
Sletrab