[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: KTable: Right handling of TableModel

Hi,

By the way another questions concerning ktable arised. Let's assume I want to format all cells nearly the same, but different background colours. Seems thats there two ways to do that. I could either have two different renderers or one renderer which background attribute changing back and forth in the doGetCellRenderer Method?

Exactly. Just do as you please.

Is there a way to chance the color of the space between the cells. Or is the only way to do that by subclassing e.g. the textcellrenderer?

You mean the separator lines between the cells?
The only way is to subclass the used render and overwrite drawDefaultSolidCellLine(). However, note that every cell draws only the bottom and right cell line.


regards,
Lorenz