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: 3030
Registered: August 2008
Ultimate Member
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: Sun Nov 17 11:13:23 CET 2019

Total time taken to generate the page: 0.01408 seconds