Mailing Lists: Apple Mailing Lists

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

Re: How to REALLY turn off scrolling in a WebView



You can subclass the NSWindow which the WebView is in and then override the sendEvent: method.  In the subclass of the NSWindow, your code should be something similar to the following:

- (void)sendEvent:(NSEvent *)theEvent
{
if ([theEvent type] != NSScrollWheel)
[super sendEvent:theEvent];
}

Therefore, any event from a scrollwheel should not be passed onto the WebView.

On Apr 24, 2006, at 1:47 PM, Craig Hunter wrote:

So, I am using this line of code:

        [[[sender mainFrame] frameView] setAllowsScrolling:NO];

Which knocks out the scrollbars nicely.  But, if a user has a scrolling
mouse, the scrollbars reappear as soon as the scrollwheel is used.  Somehow
the scrollwheel overrides the command above.  Anybody know a way to prevent
this from happening?

Thanks,
Craig

-- 
Dr. Craig Hunter
NASA Langley Research Center
Configuration Aerodynamics Branch
(757) 864-3020


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

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

This email sent to email@hidden

References: 
 >How to REALLY turn off scrolling in a WebView (From: Craig Hunter <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.