How to set the scrollers in an NSScrollView?
How to set the scrollers in an NSScrollView?
- Subject: How to set the scrollers in an NSScrollView?
- From: HAEUPL Friedrich - RTAA <email@hidden>
- Date: Tue, 24 Jul 2001 14:01:56 +0200
I want to display data graphically in a View. The amplitude of the data is limited to a rang of 0..255.
A part of the data (about 600 points visible) is displayed. As the amount of data points can be
quite huge, it should be possible to scroll to a certain position of the data points and display data
starting from this point. So a scroller is necessary.
The position of the scroller should reflect the position in the datafile and the length of the scroller
should reflect the relation of visible point to the complete amount of points. (Maybe it is necessary
to have a minimum size of the scroller, so that it doesn't become too small)
For performance reasons it is not possible to render all data in the drawRect methode, but only those
that have to be displayed. How do I set the scrollers then?
I have found a project called SndKit that uses NSScrollView this way but I'm too unexperienced to
extract the essential program code.
Can anybody provide a short example how to do this?
/* Method to replace normal ScrollView methods: */
- (void)reflectScrolledClipView:(NSClipView *)sender;
Thanks, Fritz