Example Program Drafts

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Set Front Panel Size and Position


Introduction

This example allows the user to specify the position of each border of the front panel. The panelbounds property adjusts the actual pane borders, not including the window borders, scroll bars, tool bars, title bar, etc., so ensure that there is sufficient clearance on all sides if you wish to see anything outside the actual front panel pane. Position values are in pixels and are in terms of absolute screen position (i.e. 0 is the top or left most pixel on your monitor).

Change FP Window bounds_BD.png


Instructions
  1. Open the VI.
  2. Enter the desired pixel coordinates for the 4 sides of the front panel.
  3. Run the VI.

The VI will position the borders of the front panel to the specified positions.


Additional Notes
Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
Comments
Active Participant shb
Active Participant

How can I set the size of panes? (When there are splitter bars.)

Member NiCoder
Member

Introduction

This example allows the user to specify the position of each border of the front panel. The panelbounds property adjusts the actual pane borders, not including the window borders, scroll bars, tool bars, title bar, etc., so ensure that there is sufficient clearance on all sides if you wish to see anything outside the actual front panel pane. Position values are in pixels and are in terms of absolute screen position (i.e. 0 is the top or left most pixel on your monitor).

Change FP Window bounds_BD.png


Instructions
  1. Open the VI.
  2. Enter the desired pixel coordinates for the 4 sides of the front panel.
  3. Run the VI.

The VI will position the borders of the front panel to the specified positions.


Additional Notes
Member Ajayvignesh_MV
Member

Is there any property to change the hight and width of the window in run-time?  All I can see is that I need to give all four co-ordinates (top, left, right, bottom) in order to achieve this.  I wouldn't like to give the top and left, but only the area height and width to change the window size.  Is it possible?

Knight of NI Knight of NI
Knight of NI

Ajayvignesh_MV wrote:


                       

Is there any property to change the hight and width of the window in run-time?


                   

It looks like you will have to do something like this

Set Panel Size.png


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Contributors