Jump to content

Creating a Wizard Like Interface with Subpanels


Recommended Posts

Has anyone tried using a Subpanel and some Back, Next, Finished, Cancel Buttons in a VI as a generic framework for a Wizard style interface?

The main reason I'm thinking about doing this is the functionality of many of the wizard screens is also used in other areas of my app where I don't need to lead the user through steps. I've created wizards before using tabs, but thought a subpanel might be better because I could run a subvi in the background for each wizard screen and also call a screens subvi somewhere else if I just want to execute one of the screens.

Has anyone gone down this path before. Let me know if its a stupid idea.

Brian

Link to comment
Has anyone tried using a Subpanel and some Back, Next, Finished, Cancel Buttons in a VI as a generic framework for a Wizard style interface?

The OpenG Commander installer uses a wizard-like interface, although it doesn't use subpanels (it is compatible with LabVIEW 6.1 - before subpanels were invented :) )

Link to comment
Has anyone tried using a Subpanel and some Back, Next, Finished, Cancel Buttons in a VI as a generic framework for a Wizard style interface?

The main reason I'm thinking about doing this is the functionality of many of the wizard screens is also used in other areas of my app where I don't need to lead the user through steps. I've created wizards before using tabs, but thought a subpanel might be better because I could run a subvi in the background for each wizard screen and also call a screens subvi somewhere else if I just want to execute one of the screens.

Has anyone gone down this path before. Let me know if its a stupid idea.

Brian

I did made a wizard using subpanels in LV7.0. At the time, I encountered a few "quirks" (dont want to say bugs) that made this somewhat instable (I eventually got it running fairly well). All together, I dont know if this was worth the effort to try this (at least this was a great way to learn about subpanels :) ) as opposed to use a tab control. Although, if you are in a multi developer environement, this could be a good thing to use so you can have developers working independently on separate "screen" of the wizard. The ability to reuse screen independently of the wizard can be nice too (although I never had to do so).

By the way, did you know that you can typedef a tab control so the enum (that enumerate the tab) is updated automatically ?

PJM

Link to comment

I don't think it's a stupid idea. I have created a configuration editor in a similar way, some weeks ago:

the complete configuration of the measurement task is stored in a DB and is presented in the tree on the left side. Changes in the subpanel, change the corresponding tree item. I have 3 measurement devices at time, so I have 4 subpanels: basic settings and the devices. If you select a item in the tree, the corrsponding subpanel is shown. It works pretty good ...

post-885-1150351401.png?width=400

post-885-1150351420.png?width=400

Link to comment

I am using subpanels often in test equimpment. Currently working application with one framework and over 20 modules loading dynamically from module repository (an llb :) ) and using SubPanel to show thous. flexible and nice. You have all Dynamic goodies (external vi's does not have to be build every time you try to change something, memory managment, module sequence scripting etc). Plus to this - different faces to every module, different event couplings.

So far, I did 4 big projects using this feature in some ways. Althou sometimes SubPanels are tricky..

PBleu

post-744-1150373549.jpg?width=400

Link to comment
If you select a item in the tree, the corrsponding subpanel is shown. It works pretty good ...

Nice - very nice. We have a proprietary test executive that uses sub-panels to dynamically show each test step's UI (you can make a step open it's FP if you like, or you can just follow a standard design and have it show up in the test executor's UI) - it works just fine:

post-181-1150369557.gif?width=400

Link to comment
I don't think it's a stupid idea. I have created a configuration editor in a similar way, some weeks ago:

the complete configuration of the measurement task is stored in a DB and is presented in the tree on the left side. Changes in the subpanel, change the corresponding tree item. I have 3 measurement devices at time, so I have 4 subpanels: basic settings and the devices. If you select a item in the tree, the corrsponding subpanel is shown. It works pretty good ...

The tree implementation you show is a pretty neat subpanel implementation. I especially like the icon use in the sublevels. Very professional looking.

The OpenG Commander installer uses a wizard-like interface, although it doesn't use subpanels (it is compatible with LabVIEW 6.1 - before subpanels were invented

I have taken a look at the OpenG wizard style used in OpenG Commander. That was my initial inspiration :lightbulb: because it looks and feels very professional also. I thought subpanels might help make it easier and more generic.

I had another thought last night, maybe it would easier just to make a vi template to use as a starting point for each wizard screen (with queued state machine). Then use this template to create VIs for all the screens and put the screen VIs in a top level VIs to manage the flow. The trick is passing information between each step of the wizard. I'm using some GOOP objects so it may not be as difficult as I anticipate. Anyway this strategy is not as elegant but follows the kiss principle.

Thanks for the feedback,

Brian

Link to comment
Nice - very nice. We have a proprietary test executive that uses sub-panels to dynamically show each test step's UI (you can make a step open it's FP if you like, or you can just follow a standard design and have it show up in the test executor's UI) - it works just fine:

It's not really diffucult to implement that. The actions are (of course) in the state-machine of the "framework VI" and the subpanel writes the appropriate actions into the state-Q of the framework VI. I was surprised myself how easy it was. I'm using subpanels very often, I only develop small applications without them, because I don't like lots of popup windows.

The tree implementation you show is a pretty neat subpanel implementation. I especially like the icon use in the sublevels. Very professional looking.

thank you. btw: the icons should be on your disk, too. just start a search for *.ico files, and you'll probably find them (these are mostly default windows icons ...). If you need a tool, to quickly set the "user icons" of the tree, let me know, I have a small tool. It's not proximate as pretty as the screenshots above, but will provide you an array if images, which you can use to set the custom icons.

Link to comment
I don't think it's a stupid idea. I have created a configuration editor in a similar way, some weeks ago:

the complete configuration of the measurement task is stored in a DB and is presented in the tree on the left side. Changes in the subpanel, change the corresponding tree item. I have 3 measurement devices at time, so I have 4 subpanels: basic settings and the devices. If you select a item in the tree, the corrsponding subpanel is shown. It works pretty good ...

post-885-1150351401.png?width=400

post-885-1150351420.png?width=400

This remind me that I believe NI is using this technic in LV 8.x for the option window. For those interested, go poke in "NI Root\LabVIEW 8.0\resource\dialog\PreferencesDialog". The top level is "PreferenceDialog.vi".

PJM

Link to comment
It's not really diffucult to implement that. The actions are (of course) in the state-machine of the "framework VI" and the subpanel writes the appropriate actions into the state-Q of the framework VI. I was surprised myself how easy it was. I'm using subpanels very often, I only develop small applications without them, because I don't like lots of popup windows.

thank you. btw: the icons should be on your disk, too. just start a search for *.ico files, and you'll probably find them (these are mostly default windows icons ...). If you need a tool, to quickly set the "user icons" of the tree, let me know, I have a small tool. It's not proximate as pretty as the screenshots above, but will provide you an array if images, which you can use to set the custom icons.

Slightly OT

Forgot to ask about your DB and tree control. Are the VIs you used to populate the tree from the DB proprietary? If not I'd be interested in taking a peek. I guess I'd have to brush up on my ?German? though.

B

Link to comment
This remind me that I believe NI is using this technic in LV 8.x for the option window. For those interested, go poke in "NI Root\LabVIEW 8.0\resource\dialog\PreferencesDialog". The top level is "PreferenceDialog.vi".

PJM

there, too, but I think the best exampe for this technique is the MAX?

BTW: the splitter bar functionality was used in the max log before it became availiable for the public ...

Slightly OT

Forgot to ask about your DB and tree control. Are the VIs you used to populate the tree from the DB proprietary? If not I'd be interested in taking a peek. I guess I'd have to brush up on my ?German? though.

B

The VIs itself are part of a software, I wrote for a customer, and I had to sign a non disclosure agreement, to get the job, so I'd say yes and I am not allowed to post any VIs. But the technique is not proprietary. Id would take a while, but I could try to explain, if you are interested?

Link to comment
there, too, but I think the best exampe for this technique is the MAX?

BTW: the splitter bar functionality was used in the max log before it became availiable for the public ...

The VIs itself are part of a software, I wrote for a customer, and I had to sign a non disclosure agreement, to get the job, so I'd say yes and I am not allowed to post any VIs. But the technique is not proprietary. Id would take a while, but I could try to explain, if you are interested?

I'm familiar with the tree control so I guess what I'm interested in is:

1) What DB tools did you use? labsql, ni db toolkit, or custom,

2) Do your VIs automatically traverse the database to build the tree?

3) If it automatically traverses what technique do you use?

thanks.

Link to comment
I'm familiar with the tree control so I guess what I'm interested in is:

1) What DB tools did you use? labsql, ni db toolkit, or custom,

2) Do your VIs automatically traverse the database to build the tree?

3) If it automatically traverses what technique do you use?

thanks.

ok,

1: I use an Access Database, and I use my ADO-Toolkit

2: No, I don't need any traversal

I use the following technique:

post-885-1150524437.png?width=400

each tree-item has a DatabaseID, (i32, autoindex)

a self-key to the parent element, which (of course) is in the same table,

a "rpos" : relative position

there is one special element (root, ID 1), which refers to itself, and has to be excluded from the query, otherwise the algorithm fails.

I load all elements from the table, sorted by the parent ID and relative position, and I populate the tree with the items in a for-loop in the following way: the tag of an element is it's database ID. With the sorting in the DB-query I make sure, that I get the items in the correct order (highest level first, lowest level last ...) and I insert them by checking the parent_id.

[abbrevations: SKP = self key parent, RPOS = relative position]

e.g. lets say we have four elements: a,b,c,d in the following structure:

root (ID=1, SKP=1, RPOS=1)

|--a(ID=3, SKP=1, RPOS=1)

| |-b(ID=21, SKP=3, RPOS=1)

| |-c(ID=9, SKP=3, RPOS=2)

|-- d(ID=17, SKP=1, RPOS=2)

my DB query gives me an array:

a(ID=3, SKP=1, RPOS=1)

d(ID=17, SKP=3, RPOS=2)

b(ID=17, SKP=3, RPOS=1)

c(ID=17, SKP=3, RPOS=2)

first iteration:

a is inserted as a child of root, because SKP = 1, it's inserted as the first element, because RPOS = 1

it's tag = "3", the tag of its parent is "1"

2nd iteration

d is inserted as a child of root, because SKP = 1, it's inserted as the 2nd element, because RPOS = 2

it's tag = "17", the tag of its parent is "1"

3rd iteration

b is inserted as a child of a, because SKP = 3

it's tag = "21", the tag of its parent is "3", tag "3" is allready there (because of the sorting ...)

2nd iteration

c is inserted as a child of root, because SKP = 3

it's tag = "9", the tag of its parent is "3" as the second element, because of the sorting, it is simply after the "element before" in the array and therefore processed later ...

I hope I could explain that in a way you can understand. I really had difficulties to explain that in english - although it would not have been much easier in german ;)

den man tou!

CB

Link to comment
  • 3 months later...
I am using subpanels often in test equimpment. Currently working application with one framework and over 20 modules loading dynamically from module repository (an llb :) ) and using SubPanel to show thous. flexible and nice. You have all Dynamic goodies (external vi's does not have to be build every time you try to change something, memory managment, module sequence scripting etc). Plus to this - different faces to every module, different event couplings.

So far, I did 4 big projects using this feature in some ways. Althou sometimes SubPanels are tricky..

PBleu

I am using subpanels often in test equimpment. Currently working application with one framework and over 20 modules loading dynamically from module repository (an llb :) ) and using SubPanel to show thous. flexible and nice. You have all Dynamic goodies (external vi's does not have to be build every time you try to change something, memory managment, module sequence scripting etc). Plus to this - different faces to every module, different event couplings.

So far, I did 4 big projects using this feature in some ways. Althou sometimes SubPanels are tricky..

PBleu

would you send me the sample of your master panel to call subvi into the subpanel?

tank's

engginer@telkom.net

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.