U++ framework
Do not panic. Ask here before giving up.

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: 1367
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: Sat Sep 26 09:48:19 GMT+2 2026

Total time taken to generate the page: 0.00637 seconds