Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Calculate needed cell width to fit some text
Calculate needed cell width to fit some text [message #25168] |
Sat, 13 February 2010 10:31 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
I need to setup cell widths to fit some text; with HeaderCtrl().Absolute() I can set absoulte cell widths, but I can't manage to get pixel width of a given text.
trying with
StdFont().GetAveWidth() * myString.GetCount()
gives me a by far too big value for character width.
Any hint ?
Another stuff... I have a DropGrid containing images, embedded into an ArrayCtrl. I also need to set the cell width to fit the image, but doing with Image.GetSize().cx misses the width needed for the drop arrow.... By now I do it adding a fixed value, but I'm afraid that it'll behave bad changing platform.
Ciao
Max
|
|
|
Goto Forum:
Current Time: Mon Jun 17 07:20:32 CEST 2024
Total time taken to generate the page: 0.01302 seconds
|