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 » Get Value in GridCtrl when there are coloured cells
Get Value in GridCtrl when there are coloured cells [message #37969] Mon, 26 November 2012 10:14
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Daniel

If GridCtrl has colored cells there is no function to get the data directly.

I propose you to add a function like this:

Value GridCtrl::GetValue(int row, int col)
{
	const Value &val = items[row + fixed_rows][col + fixed_cols].val;
	if(IsType<AttrText>(val)) {
		const AttrText& t = ValueTo<AttrText>(val);
		return t.text;
	} else
		return val;
}


Best regards
IƱaki
Previous Topic: InsertButton for DropChoice
Next Topic: How to read value from ArrayCtrl?
Goto Forum:
  


Current Time: Fri Mar 29 00:37:12 CET 2024

Total time taken to generate the page: 0.01326 seconds