Jump to content

How to implement the style of Preference Dialog of LabVIEW 8.2?


Recommended Posts

In LabVIEW 8.2 , The Preference Dialog Appears Like Below;

post-356-1164898630.png?width=400

In the directory of resource\dialog\PreferencesDialog you can find the PreferenceDialog.vi, the UI looks like the image as below:

post-356-1164898736.png?width=400

and in the directory of \resource\dialog\PreferencesDialog\PreferencePages you can find all PreferenceDialog pages, such like prefPage_BlockDiagram.vi look like the image as below:

post-356-1164898841.png?width=400

so I guess the PreferenceDialog.vi embodied the page Vis User Interface,When user select one item, the PreferenceDialog.vi embody the selected page vi realtime, and I think this may be implement by subPanel, But I can't realize it. Any one know the secret of PreferenceDialog? thanks a lot?

By the way, this is one way to implement plugins archetecture?

Link to comment

In the same directory, there's also a template to build your own pages (i guess), called pageTemplate.vit with an unlocked diagram. it's window title is "Use VI Window Title as Category Name" :)

you'll probably be able to figure out how the dialog works from that. it has this comment in the "PanelClose?" event case:

"This is useful during development,

so you can run your page VI without

the dialog framework.

When running in the frame VI's subpanel,

you should never get a panel close event."

so I guess the PreferenceDialog.vi embodied the page Vis User Interface,When user select one item, the PreferenceDialog.vi embody the selected page vi realtime, and I think this may be implement by subPanel, But I can't realize it. Any one know the secret of PreferenceDialog? thanks a lot?

By the way, this is one way to implement plugins archetecture?

Link to comment
In the same directory, there's also a template to build your own pages (i guess), called pageTemplate.vit with an unlocked diagram. it's window title is "Use VI Window Title as Category Name" :)

you'll probably be able to figure out how the dialog works from that. it has this comment in the "PanelClose?" event case:

"This is useful during development,

so you can run your page VI without

the dialog framework.

This is very nice of NI, I think they did this on purpose (really). I haven't looked at it yet but it sound very promising!

:thumbup: :thumbup:

Ton

Link to comment

Yes, the example Andy shows is exactly how we used the subpanel in the Preferences Dialog. We use the listbox/subpanel plug-in architecture for a number of things in LabVIEW. The Library Properties Dialog is similar and contains different pages whether you have a normal project library or are using a special type of library like a class. The VI Analyzer uses a similar method to load all tests and display the individual configuration parameteres for each test.

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.