Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mdelfede is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl large data set from DB
Next Topic: GridCtrl::Reset does not reset.
Goto Forum:
  


Current Time: Tue Apr 23 08:08:22 CEST 2024

Total time taken to generate the page: 0.02398 seconds