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

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: 3460
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
 
Read Message
Previous Topic: InsertButton for DropChoice
Next Topic: How to read value from ArrayCtrl?
Goto Forum:
  


Current Time: Fri Jul 17 02:44:21 GMT+2 2026

Total time taken to generate the page: 0.00743 seconds