From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to auto fit bmp size

Now I want to load a bmp file to fixed picture ctl.How can i fit ctl automatically?
0 Kudos
Message 1 of 4
(2,546 Views)
Read BMP file returns "rect" cluster, from it you can know width and height of picture. Set property node "DrawArrea Size" of Picture control to this data.
Look attached example.
0 Kudos
Message 2 of 4
(2,546 Views)
Hi Mark.
Was wondering why you didn't set the fit mode in the .uir to stretch to fit image, or programmatically use:-
SetCtrlAttribute(panel,control,ATTR_FIT_MODE,VAL_SIZE_TO_IMAGE);
Best Regards
Ken Green
0 Kudos
Message 3 of 4
(2,546 Views)
Sorry, but this question is for LabVIEW.
0 Kudos
Message 4 of 4
(2,546 Views)