Discussion:
How do I create a transient popup GUI?
(too old to reply)
knicewar
2008-08-08 00:40:15 UTC
Permalink
I might be asking the wrong question, so let me first explain what I'm trying to do and then go into why I want to try to use a popup. I have an array of channels, each with a name, channel ID, start time, and duration.  I'm representing this as an array of clusters.  I want to store a channel array configuration as a file that can be read when the main app VI runs (i.e. I don't want to have to modify the VI to reconfigure to use different channels).  I picked XML as the file format because that seemed the easiest to use for the VI that reads it, but it isn't particularly ideal for the operators to use as the way to specify the configuration.  I've looked at the XML file in XML editors and it ain't pretty, plus I'm worried about being prone to user error screwing up the XML file so that LabView can't read it.  So I thought it would be appropriate to build a Configure VI that reads or creates a file and allows the operator to add, edit, or remove channels.  Being a novice at LabView, I figured I'd use a multicolumn listbox to display the current configuration.  But I'm finding it incredibly complex to implement the add/edit/remove functions.  I'm forced to hide/reveal controls depending on what mode I'm in (i.e. double-click on a line reveals controls to edit the cluster contents).  I think a more intuitive approach would be to popup a dialog to enter the information and then it goes away when it's done.  How do I do this?Or is this a stupid way of configuring the array?  Is there something already available in LabView that allows editing a list of things?  The multicolumn listbox control allows arbitrary editing of the contents, but nothing for adding/removing rows.  Is this the wrong thing to use?Thanks,Keith.
mikeporter
2008-08-08 02:40:06 UTC
Permalink
While I would personally have my doubts about using XML for the data, on the whole it sounds like you are very much on the right track. In terms of creating a pop-up dialog box, a pop-up dialog box is simply a standard subVI that you have configured in a couple special ways. In the VI properties the VI Appearance tab lets you configure they way the VI looks. If you look at it you'll see there is a radio-button called "Dialog Box" that configures your VI to look and act like a modal dialog. For example it configures it to pop open when it is called, turns of the scroll bars, sets it as a modal window, and so on. For more detail check the examples.There are other tabs under the VI properties that allow you to define the window size, and where it appears on the screen.Mike...
knicewar
2008-08-11 15:40:06 UTC
Permalink
Oh, I didn't realize that you could do that with VIs -- that's cool! But it turns out that a listbox was in fact a stupid idea.  I hadn't realized that the array control has built-in support for adding, removing, and editing rows.  Much simpler too!
Loading...