Jump to content

Implement pallettes in a GUI?


Recommended Posts

I have also posted this query on the NI forums at

http://forums.ni.com/ni/board/message?boar...9&jump=true

I am looking fro idea on how to implement "palettes" in the GUI of a new application. The requirements would read; Given a set of icons, present a po-up palette populated by those icons that will allow a user to select one of the icons. The ability to group sub-sets of the icons into sub-palettes is highly desirable" As an example, just look at the function and control palette as used in LV. No I am not trying to re-write LabVIEW, just expand it envelope. 16x16_smiley-wink.gif So if you have ideas or examples, please share. Thank you! Ben

Link to comment

QUOTE(Ben @ Jun 6 2007, 06:41 AM)

Ben,

I was working on pretty much something identical to what you described 3-4 years ago (there is a reference about this in this thread). My goal was to be able to extend the behavior of clicked palette icons. For example you could execute code when clicking an icon.

The palette per say was made with a 2D array of picture control. The array was transparent, the picture were transparent too. The main VI was a "vit". It was instantiated as needed for sub palette. The palette definition was an ini file.

http://forums.lavag.org/index.php?act=attach&type=post&id=6046

I never got to finish this because of lack of time and also because I think my design was somewhat flawed.

But the 2D array of picture control work like a charm.

PJM

Link to comment

QUOTE(Darren @ Jun 6 2007, 01:59 PM)

There's the http://community.ni.com/examples/palette-api/' target="_blank">Palette API posted on the NI Community website...this would be a good place to start if you've already got .mnu files that you want to present to the user in your own manner outside of the LabVIEW palettes.

-D

Darren,

The customer ruled out that approach. Tell the developer "Nice code". I like their style. :thumbup:

PJM,

That looks great! I am definately going to have to try that.

Ben

Link to comment

Hi Ben,

Ritter's book: LabVIEW GUI: Essential Techniques has an implementation of an Outlook style sidebar that has groupings, icon selection, etc. It may not be exactly what you want, but it has full source code and you can tweak. I've used it both as is and also with some tweaks to implement a set of plugins that were dynamically configured based on how many plugins were found in a \PlugIns directory at startup time. The implementation in the book is a combination of icons in a subdirectory and an INI file with a lot of options settings.

It is picture control based, has dynamic mouse-over highlighting, etc. With little work you can make it arrange the icons as a MxN palette rather than the vertical column in the Outlook style. The source code in that book is well worth the price of the book.

YMMV

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.