Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting current scroll position from a HIScrollView



How does one get the current scroll position from a HIScrollView?

One thing I've tried is sending the kEventScrollableGetInfo to both the HIScrollView itself and to it's embeded view...
The embeded view is a HIImageView, so they should already know everything they need to know about one another.


target = GetControlEventTarget( scrollView );
stErr = CreateEvent( kCFAllocatorDefault, kEventClassScrollable, kEventScrollableGetInfo, 0, kEventAttributeNone, &theEvent );
stErr = SendEventToEventTarget( theEvent, target );
stErr = GetEventParameter( inEvent, kEventParamImageSize, typeHISize, NULL, sizeof( theSize ), NULL, &theSize );
stErr = GetEventParameter( inEvent, kEventParamViewSize, typeHISize, NULL, sizeof( theSize ), NULL, &theSize );
stErr = GetEventParameter( inEvent, kEventParamLineSize, typeHISize, NULL, sizeof( theSize ), NULL, &theSize );
stErr = GetEventParameter( inEvent, kEventParamOrigin, typeHIPoint, NULL, sizeof( viewOrigin ), NULL, &viewOrigin );



The problem is that even though create and sending this event does not generate any errors, the various event parameters are not present afterwards.


I'm guessing I'm missing something obvious....

Thanks.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.