UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Fit Tab Control and Content to Pane

Could you share an example code?

That would be the best! Thaks!    

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 11 of 17
(2,407 Views)
If you go to one page, set a control there to scale/fit to pane, then test it before you go to another page and do the same - the previous controls will have lost their scale setting. I do not know if this is a bug, or if it is the other way around; that it is a bug that makes it possible to set multiple controls on different pages to scale. It is kind of strange.

It's a bug that you can set controls on different pages to scale.

There's only supposed to be one "scale with pane" object per pane. If you set an object to scale with the pane, it "steals" the setting from the previously-set object. (For those that aren't familiar with it... the "Fit Control to Pane" menu item isn't actually its own setting; this command resizes the control to the current pane size and also sets "Scale Object with Pane").

BTW, that's a pretty nifty workaround you've developed. My apologies that tab controls were never upgraded to have panes for pages. I agree that it would make sense if they did.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 12 of 17
(2,407 Views)

Ouch.

I hope you do not fix that bug (as illustrated it works as a very nice feature...), at least not until tab pages are treated as panes or support scaling like this by other means.

Mads

0 Kudos
Message 13 of 17
(2,407 Views)

Here is a demo:

For LV2010: https://decibel.ni.com/content/docs/DOC-16423

For LV2009: https://decibel.ni.com/content/docs/DOC-16424

Just run the code, select tab pages on the top...and rescale the window while viewing the different pages. You should see that all pages have controls that scale...and one of them also have a combo of scaling and non-scaling controls.The latter is especially difficult to get working because you really have to set the controls on that page to fit to page and then scale them down at the very last, if you do not take that page last it will lose its settings (the fact that it does not, and that all the others do not either - is as Christina says a bug - but it makes for a very nice feature...).

Message 14 of 17
(2,407 Views)

Thank you very much!!!!

Ok! Works very well!

Thank you again!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 15 of 17
(2,407 Views)

Simply fantastic!

0 Kudos
Message 16 of 17
(2,407 Views)

sorry Mads for asking again on the subject. but i am following your explanation on how to add multiple control on a single tab page. i don't really understand how your first tab control ur second tab. an can u please explain how i can add and scale multiple object on a single page of the containing tabs

0 Kudos
Message 17 of 17
(2,407 Views)