Re: EuGTK - setRow
- Posted by irv Sep 22, 2010
- 1400 views
Problem here is that we're wanting to change the color of a row, and there's no such thing as a row. Only columns with n items in each column. Put 2 or more columns side by side, and you have - visually - a row. But it's not a row, it's still just columns side by side.
Example:
Say you're washing dishes in a restaurant. There are three stacks of plates, and you notice that the third plate from the top of each pile is cracked.
These plates appear to form a row of cracked plates, so you remove the third row of plates and discard them, right? Just grab the 3rd row of plates and pull it out.
Not gonna work, because the only connection between those 3 cracked plates is in your eye and mind. (and the abstract fact that they happen to be, at the moment, third from the top)
You have to remove plate #3 (or #2, if you're a C programmer and can't count) from stack 1, and plate #3 from stack 2, and plate #3 from stack 3.
So, to change the color of a "row" we change the color of the nth item in each column.
But what do we mean by nth item?
Do we want to change the color of the third item on the list, or the third item that is currently showing?
Since you can scroll a list, sort it differently, and move items around, you have to decide whether you want to:
- (a) color the nth "row" from the top, no matter what its contents, so the color remains fixed in place on the screen.
- (b) color the nth "row" in the list, so the color scrolls with & follows the contents.
- oh, and (c) decide if this is really the best way to accomplish whatever it is we are trying to do.