Jim Kring Posted November 12, 2007 Report Share Posted November 12, 2007 I have a Tab Control with several pages. Each page has one and only one control/indicator. I would like to configure each tab, such that the one control/indicator on it takes up the entire page area of the tab. For example, I have the Tab Control on a VI's pane, and the tab control is set to Fit Control to Pane. As the pane resizes, so does the Tab Control (and therefore its pages resize). I want the control on each page of the tab to also resize, so that it always fits the entire page area as the Tab Control resizes. A Fit Control to Tab Page option might do the trick. Quote Link to comment
ttkx Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(Jim Kring @ Nov 12 2007, 05:52 AM) I have a Tab Control with several pages. Each page has one and only one control/indicator. I would like to configure each tab, such that the one control/indicator on it takes up the entire page area of the tab.For example, I have the Tab Control on a VI's pane, and the tab control is set to Fit Control to Pane. As the pane resizes, so does the Tab Control (and therefore its pages resize). I want the control on each page of the tab to also resize, so that it always fits the entire page area as the Tab Control resizes. A Fit Control to Tab Page option might do the trick. http://lavag.org/old_files/monthly_11_2007/post-17-1194817930.png' target="_blank"> I want to Know that ,too! Quote Link to comment
Bobillier Posted November 13, 2007 Report Share Posted November 13, 2007 A just five minute start idea.. Run only for string control, but can easily modify for other kind of control. I look this evening for a more complete tool. Eric Quote Link to comment
Norm Kirchner Posted November 13, 2007 Report Share Posted November 13, 2007 Here here! I've encountered this more than a few times and ended up making a Brat VI to handle the management of this. I would much rather have the "control resize to tab" be integrated into the environment. Quote Link to comment
PJM_labview Posted November 13, 2007 Report Share Posted November 13, 2007 You mean like this? --------> Download File:post-121-1194887685.viLV8.5 PJM Quote Link to comment
Jim Kring Posted November 13, 2007 Author Report Share Posted November 13, 2007 QUOTE(Norm Kirchner @ Nov 12 2007, 07:59 AM) I've encountered this more than a few times and ended up making a Brat VI to handle the management of this. I would much rather have the "control resize to tab" be integrated into the environment. Hey Norm, Is your VI very general purpose? Want to make it general purpose? Need help? I'll probably end up implementing this for myself and if you've already got a head start, I would be happy to add my contributions/improvements and post them to LAVA as a BSD licensed VI. Thanks, -Jim Quote Link to comment
Ton Plomp Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(PJM_labview @ Nov 12 2007, 06:21 PM) You mean like this? --------> PJM You cheat: Ton Quote Link to comment
PJM_labview Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(tcplomp @ Nov 12 2007, 09:36 AM) You cheat: http://lavag.org/old_files/monthly_11_2007/post-2399-1194888954.png' target="_blank"> Ton Incorrect answer. I start with a regular TAB size. The TAB resizing happens behind the scene. Resize the TAB and see for yourself. PJM Quote Link to comment
Ton Plomp Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(PJM_labview @ Nov 12 2007, 07:13 PM) Incorrect answer. I start with a regular TAB size. The TAB resizing happens behind the scene.Resize the TAB and see for yourself. PJM Sorry, I think I get what you did (LaVIEW just crashed on me) You've set the control to 'size with pane', thus making the table follow, But I don't know how it goes for other tab-pages. Ton Quote Link to comment
Michael Aivaliotis Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(Norm Kirchner @ Nov 12 2007, 07:59 AM) I would much rather have the "control resize to tab" be integrated into the environment. Amen to that! Now we all need to flood the http://digital.ni.com/applications/psc.nsf/default?OpenForm' target="_blank">NI wish list page.Quick, before Aristos find out!Edit\correction Well, now that I experimented more with PJM's solution, it seems that we already have this feature. Cool! Quote Link to comment
Jim Kring Posted November 13, 2007 Author Report Share Posted November 13, 2007 QUOTE(Michael_Aivaliotis @ Nov 12 2007, 12:33 PM) Edit\correction Well, now that I experimented more with PJM's solution, it seems that we already have this feature. Cool! Not really, I've played around with it inside of panes and it doesn't always work as expected. However, I'm testing in 8.2. Maybe this is fixed in 8.5. Quote Link to comment
Norm Kirchner Posted November 13, 2007 Report Share Posted November 13, 2007 QUOTE(Jim Kring @ Nov 12 2007, 11:24 AM) Hey Norm,Is your VI very general purpose? Want to make it general purpose? Need help? I'll probably end up implementing this for myself and if you've already got a head start, I would be happy to add my contributions/improvements and post them to LAVA as a BSD licensed VI. Just nosed into my code, and realized that there is no direct way to do this because of the lack of a single "writeable" property that can change size. Has OpenG created a tool that will allow for a single input of a class reference and a size and it will correctly call the property to resize the object? ~,~ Quote Link to comment
Jim Kring Posted November 13, 2007 Author Report Share Posted November 13, 2007 QUOTE(Norm Kirchner @ Nov 12 2007, 01:12 PM) Just nosed into my code, and realized that there is no direct way to do this because of the lack of a single "writeable" property that can change size. Has OpenG created a tool that will allow for a single input of a class reference and a size and it will correctly call the property to resize the object? ~,~ I noticed this too. Unfortunately, even when different control types implement Size, it appears that they do not inherit it. So, there is no generic "Size" property. We'll have to create a type-check>>down-cast>>size-setter VI -- and, this doesn't exist. -Jim Quote Link to comment
Norm Kirchner Posted November 13, 2007 Report Share Posted November 13, 2007 Sounds like a nice mini challenge. Be the first to create the all inclusive "Size control to size" tool. We'll judge it by the max# of things that is resizes. Quote Link to comment
Yair Posted November 14, 2007 Report Share Posted November 14, 2007 QUOTE(Norm Kirchner @ Nov 13 2007, 12:59 AM) Sounds like a nice mini challenge.Be the first to create the all inclusive "Size control to size" tool. We'll judge it by the max# of things that is resizes. Done. The VI I posted http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=271190#M271190' target="_blank">here should resize any resizable control. What do I win? Of course, the problem with it is that it works the same as the manual resizing, so that there some things that you can't do with it (like resizing a numeric control vertically). There is some more info on this issue in that thread. Quote Link to comment
Norm Kirchner Posted November 14, 2007 Report Share Posted November 14, 2007 Actually, NI beat you to it. I have to say that I'm flabbergasted that NI has had this available and never wrapped it up for us, nor have I seen anyone else wrap it up. Is it dangerous to use? ....just flabbergasted. KIWI POWER! Quote Link to comment
Rolf Kalbermatter Posted November 21, 2007 Report Share Posted November 21, 2007 QUOTE(Yen @ Nov 13 2007, 12:32 PM) Done. The VI I posted here should resize any resizable control. What do I win?Of course, the problem with it is that it works the same as the manual resizing, so that there some things that you can't do with it (like resizing a numeric control vertically). There is some more info on this issue in that thread.Making the Library path in the configuration read LabVIEW instead of LabVIEW.exe would help immensely to make this VI run on any LabVIEW platform And I have a somewhat more useful version of this I think.CTRL Size Front Panel Object.vi QUOTE(Norm Kirchner @ Nov 13 2007, 04:10 PM) Actually, NI beat you to it. I have to say that I'm flabbergasted that NI has had this available and never wrapped it up for us, nor have I seen anyone else wrap it up.Is it dangerous to use? It's used deep in some of the tools that LabVIEW comes with since quite some versions that are really just LabVIEW VIs too. I haven't found it to be dangerous and it does actually have some very nice features such as resizing list boxes even vertically on pixel level, something you couldn't do in LabVIEW 7.x with other properties (the only way that allowed resizing the height of list boxes was through number of lines and calculating that based on pixel size changes of the window was a pain in the a__. Some of my application use this to create a real autosizing of some of the UIs when the user resizes the window. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.