dstrandberg Posted August 1, 2011 Report Share Posted August 1, 2011 (edited) I'm programmatically changing the images that make up various controls using the method Andrey Dmitriev described in this dicussion: https://decibel.ni.com/content/message/10496 which is similar to the method from: http://lavag.org/top...within-control/ When I do this, however, the images are imported into the control at the same size they are in the control and not the size of the image being imported. As such many of my images are getting resized and look ugly in the new controls. Does anyone know a way to import images programmatically without resizing them? I know I could do this by hand, but life would be a lot easier if I could do it programmatically. Thanks, David Edited August 1, 2011 by dstrandberg Quote Link to comment
Darin Posted August 23, 2011 Report Share Posted August 23, 2011 My goto method for resizing controls is to use the following VI from the resource directory: ...\LabVIEW 2009\resource\dialog\Resize.llb\PosDims.PasteToTargets.vi Open the ctl file you have created and get the control reference (only object), hide the label so the control bounds equal the image bounds, then use that VI to scale the control to match the original image size, then reposition the label. In the attached VI I add the ability to change the label as well. I use this to autogenerate frameless buttons from PNG glyph files. ScaleControl.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.