bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparency issues


From: Pierre-Yves Rivaille
Subject: Re: Transparency issues
Date: Tue, 21 Aug 2001 14:36:15 +0200 (MET DST)

On Mon, 20 Aug 2001, Marko Mikulicic wrote:

>   Since NSTableView uses the same NSCell for all cells, that would
> mean that the image is correctly displayed when at least two istances
> of the same image are showed on screen.

That is not true. There is a cell for each column. By default it is a
NSTextFieldCell, but if you only need to display an image, you can do the
following
  [myTableColumn setDataCell: [NSImageCell new]];
before inserting the column inside the tableView.

Using an NSImageCell might solve some of the issue you had with an
NSTextFieldCell, it is also more appropriate to use it when you only want
to display images and no text.


It is even possible to use specific cells for specific rows inside a
tableColumn.
To do this you should subclass NSTableColumn, and redefine
  [NSTableColumn dataCellForRow:]
so that it returns a specific cell for each row of the column.

(This can be useful to avoid useless redrawing, as whenever you change a
Cell in tableView:willDisplayCell:..., all part of the tableView that
shares this cell are marked as needing display. If that do not seem clear,
you can look at [NSTableView updateCell])

(for further information on [NSTableColumn dataCellForRow:] you can look
at
developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSTableColumn.html#//apple_ref/occ/instm/NSTableColumn/dataCellForRow
)

bye,

Pierre-Yves Rivaille




reply via email to

[Prev in Thread] Current Thread [Next in Thread]