• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to grab the Scroller of a WebView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to grab the Scroller of a WebView?


  • Subject: How to grab the Scroller of a WebView?
  • From: Tristan Jehan <email@hidden>
  • Date: Mon, 10 Apr 2006 14:56:45 -0400

I saw a few similar questions around. But none answered my problem. I have a WebView and want to change the width/color/location of the associated scroller.
I implemented a WebView delegate and try to get the "enclosingScrollView" in the awakeFromNib, but that fails:


--------

@implementation WebView (ENExtras)

- (void) awakeFromNib
{
	[self setFrameLoadDelegate: self];

	NSLog(@"%@", [[self mainFrame] frameView]);
	NSLog(@"%@", [[[self mainFrame] frameView] webFrame]);
	NSLog(@"%@", [[[self mainFrame] frameView] documentView]);

// What I want to get
NSScrollView *scrollView = [[[[self mainFrame] frameView] documentView] enclosingScrollView];
}


[...]
---------

returns:

2006-04-10 14:50:35.939 MyApplication[4738] <WebFrameView: 0x164c55d0>
2006-04-10 14:50:35.939 MyApplication[4738] <WebFrame: 0x164a6470>
2006-04-10 14:50:35.939 MyApplication[4738] (null)

--------

Could someone let me know why I can't get the documentView? Much appreciated!
I tried doing this from the Controller object calling the WebView object from there rather than the 'self' but I get the same problem. When if not in the awakeFromNib should I do this? These are settings to be called once.


Thank you!

Tristan
_______________________________________________
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


  • Prev by Date: Re: Size limit of NSData or NSFileHandle?
  • Next by Date: Re: dynamic glyph/character advancement
  • Previous by thread: Re: Distributed Objects - setting protocol crashing GCC 4.0
  • Next by thread: ADC Hardware discount
  • Index(es):
    • Date
    • Thread