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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mystery of (unwanted) 46 pixels

 Hello All,

 

Please run the attached VI.

I want to understand why there is an offset of exactly 46 pixels in the output of 'Total Bounds Rect Property' (Panel class).

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

That is the 46 pixels needed for the title bar, menu bar and Tool bar

 

Removing them (Ctrl+I >> Windows apperance) get you this

Capture.PNG

 


"Should be" isn't "Is" -Jay
Message 2 of 6
(2,790 Views)

I believe it includes the toolbar and the menubar.  If you go into VI properties/Window Appearance and turn them off, you'll see the number changes and gets close to zero.

 

EDIT:  And Jeff was quicker this time.  Except I didn't see the presence of the title bar having an effect on the number, just the toolbar and menu bar.

Message 3 of 6
(2,779 Views)

Just look at the Master Bound Rect of the Panel and it should tell you the offset (46 in this case) which depends on menu and toolbar visibility when you run.

Message 4 of 6
(2,776 Views)

@JÞB wrote:

That is the 46 pixels needed for the title bar, menu bar and Tool bar 


Looking at the help document of this property node, it gives no clue about it.

 

I found that to check the menu bar visibility, there are two options available:

a. VI Class >> Front Panel Window >> Show Menu Bar

b. Panel Class >> Menubar Visible

 

Similarly, is there any way to get (programmatically), whether or not 'Tool bar' is visible for a VI? 

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

Yes.  Property Nodes

 

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