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 » GridCtrl: Setting column widths programmatically
Re: GridCtrl: Setting column widths programmatically [message #35436 is a reply to message #35435] Tue, 14 February 2012 07:33 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Hi Lance!
I described solution for this problem many times Smile (that only means that current behavior is not intuitive and cumbersome..). Your SetColumns method should look like this:
	void SetColumns()
	{
		dword c=::Random();
		c=5+c%4;
                grid.Ready(false);
		grid.Clear(true);
		for(dword i=0; i<c; ++i)
		{
			grid.AddColumn(String().Cat()<<"Column "<<i, 50);
		}
                grid.Ready(true);
	}
	
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl: Sorting order
Next Topic: GridCtrl: how to show the last inserted row
Goto Forum:
  


Current Time: Sun May 12 16:55:08 CEST 2024

Total time taken to generate the page: 0.01839 seconds