• 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
Setting the position of a NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the position of a NSScrollView


  • Subject: Setting the position of a NSScrollView
  • From: Dave <email@hidden>
  • Date: Wed, 09 Sep 2015 21:54:56 +0100

Found it!

-(void) scrollToTopOfScrollView:(NSScrollView*) theScrollView
{
NSPoint			myScrollPosition;

if ([[theScrollView documentView] isFlipped] == YES)
	myScrollPosition = NSMakePoint(0.0,0.0);
else
	myScrollPosition=NSMakePoint(0.0,NSMaxY([[theScrollView documentView] frame]) - NSHeight([[theScrollView contentView] bounds]));

[[theScrollView documentView] scrollPoint:myScrollPosition];
}

-(void) scrollToBottomOfScrollView:(NSScrollView*) theScrollView
{
NSPoint			myScrollPosition;


if ([[theScrollView documentView] isFlipped] == YES)
	myScrollPosition=NSMakePoint(0.0,NSMaxY([[theScrollView documentView] frame]) - NSHeight([[theScrollView contentView] bounds]));
else
	myScrollPosition = NSMakePoint(0.0,0.0);

[[theScrollView documentView] scrollPoint:myScrollPosition];
}



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Setting the position of a NSScrollView
  • Next by Date: Swift: combining Obj-C enums
  • Previous by thread: Setting the position of a NSScrollView
  • Next by thread: Swift: combining Obj-C enums
  • Index(es):
    • Date
    • Thread