|
|
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl: Display depending by value in other column
|
|
|
Re: ArrayCtrl: Display depending by value in other column [message #34821 is a reply to message #34635] |
Tue, 13 December 2011 18:52   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
forlano wrote on Fri, 02 December 2011 11:50 | Hello,
with SetDisplay() I can tune the cells of a coloumn.
But now I need to set the color depending by the value got in another column (same row).
How can I get this value when dealing with Display? For example:
arrPlayerRes.AddColumn("Pnt1", t_("Score"), 5).SetDisplay(Single<ColoredStatus>());
arrPlayerRes.AddColumn("RATED", t_("RATED"), 4);
The color in column "Pnt1" should be determined by the value of column "RATED".
Thanks,
Luigi
|
arrPlayerRes.AddColumn("Pnt1", t_("Score"), 5).AddIndex("RATED).SetDisplay(Single<ColoredStatus>());
arrPlayerRes.AddColumnAt("RATED", t_("RATED"), 4);
Now ColoredStatus will be getting ArrayMap instead of single Value.
|
|
|
|
|
|
|
|
Re: ArrayCtrl: Display depending by value in other column [message #34851 is a reply to message #34821] |
Thu, 15 December 2011 04:44   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Tue, 13 December 2011 12:52 |
arrPlayerRes.AddColumn("Pnt1", t_("Score"), 5).AddIndex("RATED).SetDisplay(Single<ColoredStatus>());
arrPlayerRes.AddColumnAt("RATED", t_("RATED"), 4);
Now ColoredStatus will be getting ArrayMap instead of single Value.
|
Well, documentation for Column::AddIndex() says that "The newly created index is assigned the given identifier.". At the same time documentation for Column::Add() says that it "Adds another source data index to the list of source indices used as the data for the given output column.".
So, based on this documentation I'd use Add() instead of AddIndex().
And there is no notion of getting ArrayMap instead of single Value in documentation.
I understand that documentations is not fun to write and to read. I never write or read it myself. But something like KNOWLEGE BASE, something that in a VERY SHORT FORM lists and describes used concepts and relationships among them would be extremely useful. What is ArrayCtrl made from, how this stuff can be combined, and what will be the outcome. No lyrics, just concepts and relationships. 
Regards,
Novo
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 19:14:57 CEST 2025
Total time taken to generate the page: 0.02474 seconds
|
|
|