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
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
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
Thank you for the tip.
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 - 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.
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...
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
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
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).
That's a shame
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
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
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
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...
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?
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
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.
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.
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.
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.
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.
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!
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. 🙂
I'm all read up on it!
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?
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
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.
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