Re: Synchronizing scolling of NSTextView and NSTableView
Re: Synchronizing scolling of NSTextView and NSTableView
- Subject: Re: Synchronizing scolling of NSTextView and NSTableView
- From: Wain <email@hidden>
- Date: Fri, 16 Dec 2005 16:52:50 +0000
Hi,
Not sure exactly what you're trying to accomplish here, why isn't all
of the data just in the table view?
Never mind, some things to think about...
You could subclass NSScrollView to override reflectScrolledClipView:
and scrollWheel: to notify you of changes.
Look at NSViews scrollRectToVisible: and NSClipViews scrollToPoint:
methods.
It shouldn't be too difficult to have a controller watch your table
view for scrolling and scroll the text view appropriately.
Wain
On 15 Dec 2005, at 04:12, Nik Youdale wrote:
Hi,
This is my first post, so i hope it works...
What i have is an NSTextview on the left and an NSTableView on the
right of a window. I have a scrollbar in the NSTableView visible,
but i have hidden the one in the NSTextView. Basically, there are
lines of text in the textView which must stay aligned with the rows
of the tableview. so basically, any scrolling activity (mouse
wheel, scroll bar, or from editing) must be synced in both views.
How do i do this??
Thanks in advance
-Nik
___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online!
http://uk.cars.yahoo.com/
_______________________________________________
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