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 » Community » Newbie corner » GridCtrl - get width column
Re: GridCtrl - get width column [message #57304 is a reply to message #57302] Thu, 01 July 2021 21:44 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

Right Smile But you can do this with:
grid.GetWidth(my_column_index) - grid.GetWidth(my_column_index - 1)

But be careful with the moment you're calling those functions. If you add columns with widths expressed as proportions then the actual pixel width is not set until first grid paint is made.
Don't really know what's your use case but you shouldn't be interested in column width's in most cases until you want to paint sth inside the cell. But then you need to provide your own Display implementation in which current width and other properties are available. So that's another story.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ultimate++ vs Wxwidgets for desktop linux/windows/mac app
Next Topic: Linux Executable
Goto Forum:
  


Current Time: Fri Aug 22 03:07:55 CEST 2025

Total time taken to generate the page: 0.05299 seconds