Jump to content


Photo
- - - - -

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


  • Please log in to reply
4 replies to this topic

#1 keiran

keiran

    More Active

  • Members
  • PipPip
  • 38 posts

Posted 30 November 2006 - 03:04 PM

In LabVIEW 8.2 , The Preference Dialog Appears Like Below;

Posted Image

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

Posted Image

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:

Posted Image


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?

#2 Dirk J.

Dirk J.

    Very Active

  • Members
  • PipPipPip
  • 166 posts
  • Location:Amsterdam
  • Version:LabVIEW 8.6
  • Since:2000

Posted 30 November 2006 - 04:04 PM

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?



#3 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 30 November 2006 - 06:34 PM

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

#4 AndyDm

AndyDm

    Active

  • Members
  • Pip
  • 19 posts

Posted 01 December 2006 - 02:57 PM

I think this may be implement by subPanel, But I can't realize it.

Yes, it seems to be realized with subPanel.
Probably attached "quick and dirty" VIs will be helpful for you?
Download File:post-1163-1164984963.zip
best regards,
Andy

#5 xtal

xtal

    Very Active

  • Members
  • PipPipPip
  • 131 posts
  • Location:Flagstaff, AZ
  • Version:LabVIEW 8.6
  • Since:1989

Posted 01 December 2006 - 03:23 PM

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.