LabVIEW Idea Exchange

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

Independent control for user resizing front panel horizontally and vertically

Status: New

This should be simple....(!?)

 

I want my user to be able to resize the window but only in one dimension - e.g. drag the right border of the front panel right or left but not allow them to resize the height while the VI is running. (In my current project it just doesn't make sense to allow them to do this).

 

I have to keep rewriting the front panel size on the resize events but it has ugly side effects (parts of the front panel become visible temporarily until LabVIEW puts the bottom border back, amongst other things).

 

The VI properties can disable resizing completely but it should be easy to add a couple of sub checkboxes for Height and Width.

 

I'd like to see those properties reflected in the usual places (property node etc).

 

 

Resize VI properties.png

 

Support didn't have a better solution than the code I have but suggested that I put in an idea .... so this is it!

4 Comments
K C
Trusted Enthusiast

Good Idea, just added this to a program. But it would be better if it is avaible through a property node.

Thoric
Trusted Enthusiast

I suspect the existing property directly maps to a Windows property that prevents a window frame from being selected and resized. Therefore, adding independency for the horizontal and vertical dimensions would require a lot of intervention from the LabVIEW run-time engine to deny resizing in one of the directions. This therefore probably isn't an easy thing to implement.

 

You can, however, attempt to make this work yourself with an event structure case set to the Panel Resize event. You can then programmatically set the panel size based on your restrictions.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


magicbean
Member

@Thoric: I do already make it work with resize events (see text in original post) but it doesn't stop the user dragging the border before the window is resized. It really isn't pretty.

The point of the idea would be to allow the user to drag one edge of the window only, not to keep continuously patching it up afterwards.

shb
Active Participant
Active Participant

Already suggested here: Horizontal-and-vertical-window-resize