dblk22vball Posted November 22, 2008 Report Share Posted November 22, 2008 I was wanting to create a large settings editor, and wanted to avoid doing a bunch of dialogs for different aspects. So my thought was to create something similar to max or most any other settings pages that you see in programs. You have a tree control or listbox on the left hand side, and depending on what row/item you click on, the right hand side changes to the options availible for that setting. I was thinking that it might have something to do with subpanels, but it did not seem to look the same, and seems somewhat complex to pass the data set on the page to the main UI, while allowing the main ui to handle events when the person is editing the settings. (I know that you can use the get controls, set controls methods, but thought there might be a cleaner option) My other thought was you could make all the controls visible and not visible as needed, but that seemed WAY to tedious. I suppose I could use a tab control as well, but it just didnt look as clean as I wanted. Thanks for your thoughts. Below are screen shots from a program that does what I am thinking. Quote Link to comment
Shaun Hayward Posted November 22, 2008 Report Share Posted November 22, 2008 You could try using an invisible tab control (using the color tool to set a tab control's color to transparent after you've placed it on the front panel, and hiding the tabs themselves) Having placed that, you could then use the tree control events to programmatically change the tab control's page. Quote Link to comment
LAVA 1.0 Content Posted November 22, 2008 Report Share Posted November 22, 2008 There is a framework allready shipped with LabVIEW that does exactly what you describe: LabVIEW x.x\Resources\Dialog\PreferencesDialog. It is used by the LabVIEW options dialog and allows you to create custom dialog pages. Ton Quote Link to comment
Tim_S Posted November 22, 2008 Report Share Posted November 22, 2008 QUOTE (dblk22vball @ Nov 21 2008, 11:15 AM) I was wanting to create a large settings editor, and wanted to avoid doing a bunch of dialogs for different aspects. So my thought was to create something similar to max or most any other settings pages that you see in programs. [snip] I think you can get the look you're seeking with the tab control. The tab control can be made invisible and the tabs hidden. I've used subpanels for similar functionality and it's a bit of a pain handling when the user clicks on the "ok" button as it was not very clean to handle saves, especially when an error occurs. I'm certain there's better methods than what I used (hidden boolean on the subpanel), but everything we were coming up with required a fair amount of time we didn't have. Now, should you have a dynamic list of configuration options (say from plugins), then I expect you'd need to use the subpanel to get the look you're going for. Tim Quote Link to comment
dblk22vball Posted November 22, 2008 Author Report Share Posted November 22, 2008 QUOTE (Ton @ Nov 21 2008, 09:36 AM) There is a framework allready shipped with LabVIEW that does exactly what you describe:LabVIEW x.x\Resources\Dialog\PreferencesDialog. It is used by the LabVIEW options dialog and allows you to create custom dialog pages. Ton The files are password protected. I will look at the transparent tab control for now. Thanks Quote Link to comment
AndyDm Posted November 22, 2008 Report Share Posted November 22, 2008 ZITAT(dblk22vball @ Nov 21 2008, 04:59 PM) I will look at the transparent tab control for now. Thanks I will not recommend to use Tab Control in this case. The problem that you can't add pages to the Tab Control programmatically, so you will need to create pages before, and this will give troubles for further development. What you can do is following - place SubPanel on the Front Panel, then open references to your SubVIs with settings and insert your "pages" dynamically into SubPanel. LabVIEW preferences dialog organized exactly in that way. Somewhere here was an example how to do this, but I'm unable to found... Andrey. UPD. Found here: http://forums.lavag.org/How-to-implement-t...W-82-t5157.html Quote Link to comment
jgcode Posted November 22, 2008 Report Share Posted November 22, 2008 QUOTE (dblk22vball @ Nov 22 2008, 12:15 AM) I was thinking that it might have something to do with subpanels, but it did not seem to look the same, and seems somewhat complex to pass the data set on the page to the main UI, while allowing the main ui to handle events when the person is editing the settings. (I know that you can use the get controls, set controls methods, but thought there might be a cleaner option)I suppose I could use a tab control as well, but it just didnt look as clean as I wanted. I'm with Andrey on this one - I don't like use the tab control as a type def. I use the plugin architecture for most GUIs I create, as it is a flexible, scalable design. But I don't think it hard at all to pass data. I dynamically register all universal controls (hosted by the Main UI - e.g. tree control) to an interface that the plugin vis can access Each plugin should handle its own data and have its own UI (no need to pass data to the Main UI) Each screen's data is an object(s). Each other screen can access another screens data through an interface if needed Quote Link to comment
crelf Posted December 28, 2008 Report Share Posted December 28, 2008 QUOTE (Ton @ Nov 21 2008, 10:36 AM) LabVIEW x.x\Resources\Dialog\PreferencesDialog.It is used by the LabVIEW options dialog and allows you to create custom dialog pages. I'd like to use these for options dialogs in my own applications - nothing makes less sense than reinventing the wheel. Has anyone done any work with these VIs? This looks really interesting, and I'd love to see an example, if anyone has one to share... 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.