• 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
NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.


  • Subject: NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.
  • From: Sanjay Arora <email@hidden>
  • Date: Wed, 04 Jul 2012 13:15:01 +0530
  • Thread-topic: NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.

Below is my code that overlays a control on the horizontal scrollbar.

(void)tile {
	[super tile];
	if (subControl) {
		NSRect subControlFrame = [subControl frame];
		NSScroller *horizontalScroller = [self
horizontalScroller];

 		NSRect scrollerFrame = [horizontalScroller frame];
		// adjust control position here in the scrollview
coordinate space
		subControlFrame.origin.x = scrollerFrame.origin.x;
		subControlFrame.origin.y = scrollerFrame.origin.y;
		subControlFrame.size.height = scrollerFrame.size.height;
		// move controls
		[subControl setFrame:subControlFrame];

 		NSRect subControlFrame2 = [subControl frame];

		scrollerFrame.origin.x += subControlFrame2.size.width;
		scrollerFrame.size.width -= subControlFrame2.size.width;

		 [horizontalScroller setFrame:scrollerFrame];
		}
	}


After the line
    [subControl setFrame:subControlFrame];

 it stops responding to system preferences??

Regards
Sanjay

_______________________________________________

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

  • Follow-Ups:
    • Re: NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.
      • From: Lee Ann Rucker <email@hidden>
References: 
 >NSWindow setShowsResizeIndicator not working (From: Sanjay Arora <email@hidden>)
 >Re: NSWindow setShowsResizeIndicator not working (From: Lee Ann Rucker <email@hidden>)
 >RE: NSWindow setShowsResizeIndicator not working (From: Sanjay Arora <email@hidden>)

  • Prev by Date: Re: Stupid block syntax!
  • Next by Date: Re: CheckEventQueueForUserCancel() equivalent in Cocoa ?
  • Previous by thread: Re: NSWindow setShowsResizeIndicator not working
  • Next by thread: Re: NSScrollView does not honor system preferences for scroll bars ("when scrolling"), when I override the -tile method.
  • Index(es):
    • Date
    • Thread