bindings resize rowHeight problem in NSTableView
bindings resize rowHeight problem in NSTableView
- Subject: bindings resize rowHeight problem in NSTableView
- From: Michael Link <email@hidden>
- Date: Fri, 10 Mar 2006 14:58:08 -0600
I have the rowHeight binding of an NSTableView bound to a BOOL that
has a value transformer that returns 16 or 32. The table view also
responds to - tableView:heightOfRow: and some row heights are
different. (Think source list with the separators having smaller
heights than the icons, and the icons are adjustable to be small or
large. The table view also is set to automatically hide scrollers and
automatically size last column to fit. There is no horizontal scroller.
When I run my application and the source list icons are set to large
(the document view over runs the clip view height so there is a
vertical scrollbar) and I select the tableview to display small
icons, the view switches to small icon view and has a drawing glitch
at the very top (below the headerview), it draws one of my separator
cells right below the headerview. Also data is small enough to fit
within the tableview so the document view should shrink to fit within
the clip view but it doesn't, thus the vertical scrollbar is still
present. Subclassing in drawRect: and calling [self sizeToFit]
doesn't seem to help.
When I run my application and the source list icons are set to small
initially and I select an option to have large icons displayed the
tableview draws the cells but it doesn't seem to recalculate the
documentview size (so even though the document size should be larger
than the clip view it doesn't recognize this and doesn't draw a
vertical scrollbar, I subclassed NSScrollView and noticed that the
document view height in fact does not seem to get updated). The
cursor rects don't seem to get updated for the cells that are drawn
below where the previous small sized cells were drawn either (can not
click the bottom 2 cells in the view, although the cells that are
clickable do correspond to the correct selections).
Hopefully some screen captures can help explain this too.
http://julia.fractal.net/images/smalltolarge.jpg
I've tried subclassing - [tile] in NSTableView and setting a new
frame, which works except the cursor rects still do not get updated.
I tried calling resetCursorRects but that didn't help either. I also
noticed that when going from small to large icons that I can scroll
to the bottom but the part of the cell that wasn't drawn in the
redraw won't be drawn unless I click one of the cells.
If anyone has any suggestions that would be much appreciated.
--
Michael
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden