Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl cell color
Re: ArrayCtrl cell color [message #791 is a reply to message #789] |
Thu, 02 February 2006 21:46 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
luzr wrote on Thu, 02 February 2006 14:43 |
Means, to solve the trouble, use Margin(0) (but you will perhaps have to provide some margins in your Display).
| Providing the margin inside the Display results in other problems: If the column contains cells with different Display-s (such as lots of StdDisplay cells) all of them should be subclassed to provide the margin. And there seems to be no easy way to make the margin size settable on a per-column basis if the margin is provided by the Display (any many other classes). It is inconvenient for the client code to create multiple subclasses (adding margin for every flavor of Display) just to modify the background color of a cell. I have some other alternative ideas for customizing the margin color withouth removing the margin, or definig several new classes.
Alternative 1: (new method)void Display::PaintMargin(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword s) const
{
w.DrawRect(r, paper);
} Alternative 2: (new field in the Column and CellInfo):class Column : FormatConvert {
ArrayCtrl *arrayctrl;
Mitor<int> pos;
const Convert *convert;
Ptr<Ctrl> edit;
const Display *display;
const Display *marginDisplay;
....}
Obviously both of these alternatives need a small modification in the ArrayCtrl::Paint, to use the method for painting the margin area. And both alternatives have a really small performace hit. But the common benefit of them is that the client code could keep the settable margin in columns and mixed Display cells in the same column withouth subclassing every Display flavor. Would you consider adding one of these solutions to the library?
|
|
|
|
|
ArrayCtrl cell color
By: hojtsy on Wed, 01 February 2006 16:29
|
|
|
Re: ArrayCtrl cell color
By: mirek on Wed, 01 February 2006 17:59
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Thu, 02 February 2006 16:51
|
|
|
Re: ArrayCtrl cell color
By: mirek on Thu, 02 February 2006 20:43
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Thu, 02 February 2006 21:46
|
|
|
Re: ArrayCtrl cell color
By: mirek on Thu, 02 February 2006 22:10
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Thu, 02 February 2006 22:46
|
|
|
Re: ArrayCtrl cell color
By: mirek on Thu, 02 February 2006 23:11
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Fri, 03 February 2006 00:06
|
|
|
Re: ArrayCtrl cell color
By: mirek on Fri, 03 February 2006 14:29
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Fri, 03 February 2006 15:28
|
|
|
Re: ArrayCtrl cell color
By: mirek on Fri, 03 February 2006 16:38
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Fri, 03 February 2006 16:48
|
|
|
Re: ArrayCtrl cell color
By: mirek on Fri, 03 February 2006 17:56
|
|
|
Re: ArrayCtrl cell color
By: fudadmin on Mon, 06 February 2006 06:20
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Tue, 07 February 2006 13:43
|
|
|
Re: ArrayCtrl cell color
By: forlano on Tue, 27 June 2006 20:13
|
|
|
Re: ArrayCtrl cell color
By: hojtsy on Tue, 27 June 2006 22:06
|
|
|
Re: ArrayCtrl cell color
By: forlano on Wed, 28 June 2006 00:49
|
|
|
Re: ArrayCtrl cell color
|
|
|
Re: ArrayCtrl cell color
By: mirek on Wed, 28 June 2006 14:13
|
|
|
Re: ArrayCtrl cell color
By: forlano on Wed, 28 June 2006 16:26
|
|
|
Re: ArrayCtrl cell color
|
|
|
Re: ArrayCtrl cell color
By: mirek on Sun, 19 February 2006 23:48
|
Goto Forum:
Current Time: Tue May 14 22:14:15 CEST 2024
Total time taken to generate the page: 0.02379 seconds
|