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 » Simpler way to access Option in GridCtrl
Simpler way to access Option in GridCtrl [message #31987] Thu, 14 April 2011 10:34 Go to previous message
koldo is currently offline  koldo
Messages: 3005
Registered: August 2008
Ultimate Member
Hello Daniel

Option() method is very nice but it is not possible to get access to the underlying control (for example to set a WhenAction()).

To get that possibility when adding a row I have to do this:
while(SQL.Fetch()) {						// Loop for all fetched data
	grid.Add();						// Added new row
	for (int i = 0; i < fields.GetCount(); ++i) {		// For all fields
		sqlBase.grid(i) = SQL[i];			// Filling with data
		if (column is Option) {				// THIS HAVE TO BE DONE FOR ALL ROWS
			Option *opt = new Option();		// new Option()
			opt->WhenAction = THISBACK(MyCallback);	// Set the callback to the control
			sqlBase.grid.SetCtrl(i, opt);	 	// Set the control to the cell
		}
	}
}


Is there any simpler possibility?


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIX: ArrayCtrl to support Style
Next Topic: GridCtrl: detecting a change of a search string
Goto Forum:
  


Current Time: Tue Oct 22 08:07:38 CEST 2019

Total time taken to generate the page: 0.01402 seconds