UI Interest Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

The "Missing" System Control Suite - Vector Buttons

Hi All,

I love this Control Suite, but I do like to resize my buttons so I've changed the buttons to Vector based.

This is my first stab at using the VI package manager to distribute tools so be gentle with me.

They are done in LV2009, the vipc file should install the new buttons straight into your tools palette.

As time allows I'll try and package them up for other versions etc if anyone wants it.

Regards

Steve Watts

www.ssdc.co.uk

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Comments
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Nice to see vectorised controls that one can resize without loss

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Olivier-JOURDAN
Active Participant Active Participant
Active Participant
on

Hi swatts,

could you explain me how you obtain your vectorised controls?

What is the picture file format you use? Which application do you use?

Thanks,

Olivier


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

LabVIEW accepts WMF format (and possible EMF too) for vectorised graphics. You can create these from within Powerpoint quite easily.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Olivier-JOURDAN
Active Participant Active Participant
Active Participant
on

Thank you for the tip.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
DFGray
NI Employee (retired)
on

Open source applications, such as Dia and Inkscape will also produce WMF format.  Note that using WMF graphics will probably limit you to Windows platforms.

Christina_R
Active Participant
Active Participant
on

This is a neat trick! I didn't know LabVIEW would accept WMF images.

Can I ask why you chose to replace the entire button image instead of making decals on System buttons?


Christina Rogers
Principal Product Owner, LabVIEW R&D
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Christina - I tried vectorised decals once and found they do not scale with the button, so using a vectorised or bitmapped decal makes no difference. However, forgoing decals and superimposing the decal into the button images gets around this. Although this does have the odd disadvantage too.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Christina_R
Active Participant
Active Participant
on

Ah yes, I forgot that decals don't scale with the button by default. There's a little unpublished feature in LV 2011 that I think you will like.   I'll talk about it at my NIWeek 2011 session on customizing controls.

If anyone wants to give me a vectorized image that would work as a system button decal, I'll run a little experiment... I think I can get it to scale with the button, even in versions of LabVIEW before 2011...


Christina Rogers
Principal Product Owner, LabVIEW R&D
swatts
Active Participant Active Participant
Active Participant
on

Many programs produce wmfs, sadly not very many produce wmfs that paste into LabVIEW correctly.

In fact as a minor project it would be nice if the community would come up with a list of programs that do and don't.

Or maybe I'm doing something wrong when using programs like OpenOffice Impress or InkScape.

I think that when the image is vectorized (if that's a word) and imported into a control it becomes a LabVIEW control image and is therefore platform independent.

As I only have Windows here I can't test my theory

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

swatts
Active Participant Active Participant
Active Participant
on

Christina,

I'll add the powerpoint file with my images on it. I'd be interested in any results you get.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Christina_R
Active Participant
Active Participant
on

I opened your VI on my Mac, and it almost works - the images show up, but the transparency doesn't work. (You get white backgrounds).


Christina Rogers
Principal Product Owner, LabVIEW R&D
swatts
Active Participant Active Participant
Active Participant
on

That's a shame

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

swatts
Active Participant Active Participant
Active Participant
on

I've used Flash (very old version), Powerpoint and Pro-Engineer to produce wmfs that paste into LabVIEW correctly.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

ProE? Wow, didn't know that exported as WMF. I'd be interested in seeing what you created in that example if you're able to share it?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


swatts
Active Participant Active Participant
Active Participant
on

oooh this was 10 years ago, I'll see if I can dig it out. It was an test system Interlock indicator, doors open, clamps shut. Looked very nice.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

crelf
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

I designed the control elements for a UI in TurboCAD and exported them as WMFs (all the items on the UI move around to represent the actual machine's state) and it worked great.   I'd attach it to this post, but the "Insert Image" button isn't working right now for some reason...





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Christina_R
Active Participant
Active Participant
on

I attached the results of my experiment, SystemStop1.ctl. It's not exactly what I'd hoped it would be.

If I add the image as a decal and use some secret tricks to have it resize with the button but restrict it to maintain its aspect ratio, it doesn't end up in the correct position after resizing the button.

So, the attached SystemStop1.ctl doesn't restrict the aspect ratio. If you grow the button in one direction, the image is squished.

What do you think? Useful or not good enough?


Christina Rogers
Principal Product Owner, LabVIEW R&D
Thoric
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Christina - Personally I think it's quite useful, but I agree it's a shame the decal can get distorted. Do you have to keep the tricks you used secret?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


swatts
Active Participant Active Participant
Active Participant
on

Another question is that the system buttons should change button styles depending on the operating system. Is this why we should be changing the decal and not the button image?

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Christina_R
Active Participant
Active Participant
on

Thoric - After LabVIEW 2011 releases, the tricks will no longer be secret. (The key here is that LabVIEW already has ways of defining the resize behavior of control parts, but no UI for setting them. The unpublished feature in LV2011 lets you set them, but since only the UI is new, save-for-previous lets you get the resize behavior in older versions. Unfortunately, though, the resize-but-keep-aspect-ratio setting appears to always grow the part to the left, which moves the decal off of the button. I'll certainly try to think of how I can fix this in a future version).

swatts - Yes, using the decal would allow you to have a button that adapts to the OS.


Christina Rogers
Principal Product Owner, LabVIEW R&D
francois-normandin
Member Member
Member
on

This is really encouraging news. I can't wait to see what API is available in LV2011 to customize the controls.

GCentral ChampionCLA
GregFreeman
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Can anyone point me to the unpublished feature. I either know about it, and don't realize I do. Or, I can't find it.

Christina_R
Active Participant
Active Participant
on

If you mean my unpublished feature, it's still unpublished. 🙂

I talked about it at my NIWeek 2011 presentation, but the interface is very tedious and there are caveats about its (mis)use, so I don't want to give it out in general.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Active Participant
Active Participant
on

With all due respect to Stephen and Allen, the exact same can be said of the Actor Framework, but they released it anyway because they recognized a gaping hole in the language's capabilities and knew how to fill it. AF is still a complex beast, even months after its online debut: there's a steep learning curve involved, and it's easy to shoot yourself in the foot. Creating large families of classes was also tedious until Allen published the Message Maker tool, and that's still imperfect. But for those who are capable of treating LV like a software engineering language and regularly wring every drop of capability out of it as integrators and product developers, AF is a blessing.

I hope you'll reconsider your stance and give the power users a chance to use your feature to enhance the capabilities of the language and provide feedback to you in an accelerated and direct interaction on the NI Community.

Christina_R
Active Participant
Active Participant
on

I did give it out, to the "power users" who attended my NIWeek session. 🙂

Seriously,though, I'll give it out privately if someone tells me they understand the risks and they want to use it anyway. I just don't want to publish it online so people can turn on these features without understanding that they're not ready for prime time.


Christina Rogers
Principal Product Owner, LabVIEW R&D
GregFreeman
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Unfortunately this "power user" was unable to get away from work for NI week . However, I will say I am going for my CLA next month and currently work for an alliance member so hopefully that gives you a bit of confidence that I won't botch stuff up too bad!. I do understand the risks but would really like to work with this to determine if it is something that will prove beneficial for our applications. My email is in my profile, and Christina, please let me know if you have any more questions or concerns.

Thanks!

Christina_R
Active Participant
Active Participant
on

If you tell me you've looked over my session slides (https://decibel.ni.com/content/docs/DOC-17431), I'll e-mail you the key. 🙂


Christina Rogers
Principal Product Owner, LabVIEW R&D
GregFreeman
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

I'm all read up on it!

DavidZ.
Member
Member
on

Hi Steve,

I installed your VectorMissingSystemButtons (two years later...). When resizing them (and also those of the VectorSystemButtons.vi) the contour/frame/border resizes also. Is this your expected behavior? If yes, then was your focus to have the gradient and icon resizing? Someone ever managed to keep the control's contour 1 pixel thick when resizing after he imported a customized (not LV-decoration) vectorgraphics image?

VectorSystemButtons - destorted.png

swatts
Active Participant Active Participant
Active Participant
on

Hi David

It's expected if you use the full vector image, I've not played around with the decal stuff much..A job for the coming months I think.

I get round it by making the images near the size I'm going to use (unsatisfactory I know, but needs must)

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Matthew_Kelton
Active Participant
Active Participant
on

Unfortunately, LabVIEW does not use a 9-slice image for its images in controls.  You would need this in order to not have the border edges to scale with the image.  I would love to see the feature, but I suspect it's a pretty labor intensive feature to add.

DavidZ.
Member
Member
on

Thanks for the info, swatts and Matthew. 9-slice image control would definitely be amazing! Or then to have more LV decorations available for customizing controls with vectorgraphics and their resizing capabilites.

David

Contributors