LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Text width of ring control

Hello all,
I would like to enlarge a control ring so that the largest of its items can
fit. I don't see a way to get the with of each item string in pixels.

Is there anything better than a workaround getting the text strings, writing
them to a hidden canvas and getting the pixel width from that ?
--
Guillaume Dargaud
http://www.gdargaud.net/Antarctica/


0 Kudos
Message 1 of 3
(3,092 Views)
You could use GetTextDisplaySize () function, which returns height and width of a string in a given metafont (to be created with CreateMetaFont prior to using it if you are not using a predefined metafont like VAL_DIALOG_META_FONT or so). Dimensions are returned in pixels.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,090 Views)
Absolutely. I thought I had to write the text first.
Thanks
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 3 of 3
(3,087 Views)