UI Interest Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Collapse and Expand Controls

Summary:

To save space at the user interface, I created an XControl that you can collapse to the title only or expand to see all.

Each Control/ Indicator can be collapsed or expanded and all of them can be stucked together.

Function:

Each Control is referenced to set the dependance to the others. Within the properties you can set to which control each is stucked, if the control initially is collapsed or expanded and the color of the control. The Name is set to the control's label.

Steps to execute code:

  1. Download attached archive
  2. Unpack this archive
  3. Open project CaE Project.lvproj
  4. Run VI named Example.vi
  5. Press Collapse/Expand buttons and change values.
  6. Stop this VI with stop button and explore code of XControl

The example GUI it looks like this:

Example_FP.PNG

In the block diagram you have to pass the control references so that the following controls can snap to the above ones:

Example_BD.PNG

The XControl is written in LabVIEW 2014 and additionally convertet to LabVIEW 2011. Please free to download and test it.

This is Version 2 with color settings.

Comments
Member sayak
Member

can you please post a 2011 version?

Member Ludwig72
Member

sure, done

Active Participant nolsqn
Active Participant

awesome work mate

Regards
Member c_f_huerta
Member

Looks great! Good job and thanks for sharing.

Active Participant battler.
Active Participant

Great job!  Thanks for sharing.

Can you explain how Resize.vi works?  What is the purpose of the Loge?  Does it resize in 20 small steps?

Can more controls be added easily and can the colour scheme be changed?  It would be good if the UI conformed with Win 8 style guide.

Member Ludwig72
Member

Yes, resize and replace work in little steps to look like an animation. When an object resizes all objects in the chain are replaced whitin the same steps.

A color scheme is a good hint to do but Win 8 conformance is not a target for me. There are other examples here which bring you Win 8 controls.

Member gargrahul
Member

can u please post a 2010 version also??

Active Participant dsavir
Active Participant

Great UI nad great concept!

Is it possible to put a cluster inside the XControl instead of a numeric?

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Member Ludwig72
Member

@gargrahul Sorry, I can't convert it to any version.

@dsavir Until now it's only an example with numeric controls. I have an plugin-like concept in my mind to use it with any control or cluster, but I don't have time to realize it.

Contributors