LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic resizing of controls on an EasyTab?

Is there an easy way to resize the controls on an EasyTab control? I've tried two things:
1. using EasyTab_AutoSize when EVENT_PANEL_SIZE is called, but this only resizes the tab
2. Setting the ATTR_SCALE_CONTENTS_ON_RESIZE attribute for the panel, but this generates a run-time messagebox of "The attribute passed is not valid".
The scaling is also not correct after the error box is dismissed. Some items are scaled, but not all, and the scale looks like it is for the whole window area, not just the portion that is on the easy tab.
I've tried looking at both the easytab sample and the autosize sample, but neither seem to work correctly for what I'm trying to do.
0 Kudos
Message 1 of 3
(3,230 Views)
Hi,

Have you tried setting in all of the panels in the uir to "Scale Content on Resize"? The tab control is just built out of the panels that you create, the resize propertie will be independent forevery panel. If you set all of them to resize content then the hole application should resize the content.

Hope that helps.

Juan Carlos
N.I.
0 Kudos
Message 2 of 3
(3,230 Views)
Hi Juan -
Yes, I had tried that. I had a table control on the panel that was causing the problem. It turns out there is a bug in the table control (I got a response from another NI developer verifying the problem), where it will not respond properly to the automatic resize property if the table is empty. Putting a dummy entry into the table allowed it to work properly.
0 Kudos
Message 3 of 3
(3,230 Views)