• 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
Re: Strange NSScroller sizing behaviour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange NSScroller sizing behaviour


  • Subject: Re: Strange NSScroller sizing behaviour
  • From: Jo Meder <email@hidden>
  • Date: Mon, 3 May 2010 20:37:04 +1200

Hi Bill,

On 1/05/2010, at 6:19 AM, Bill Appleton wrote:

> hi anyone out there,
>
> i have more information on this scroll bar bug
>
> if i open more and more text windows the scroll bar (nsscroller) appears on the right or bottom of each one
>
> each window has 2 scroll bars, i have verified the 2 sub views, but only one can appear at a time
>
> i can't find any graphics clipping problems or something like that
>
> i have looked for something that tells the scroll bar to be vertical or horizonta but can't find it, i assume it looks at the width or height & just does that automatically
>
> i think i can see a horizontal bar stuck in a little piece of the vertical slot, and a vertical bar stuck in the horizontal slot
>
> the slots are correct in size, but the bar hasn't re-jiggered to fit the slot
>
> does anyone know what is going on?

Your problem is unrelated to the NSScroller problem I'm experiencing. However, looking at my code I'm not doing anything special when I create my NSScrollers to make them horizontal or vertical other than giving them the correctly oriented frame rect. For example if the frame rect is wider than it is high then I get a horizontal scroller. I'm not sure that helps, but it might pay to check the your frame rects are correct.

Here's a snippet of my creation code. As you can see it's pretty straightforward:

m_scroller = [[NSScroller alloc] initWithFrame:boundsRect];
m_nativeControl = m_scroller;
if ( m_scroller != nil )
{
	SetMinValue( inParams.minValue );
	SetMaxValue( inParams.maxValue );
	SetValue( inParams.initialValue );
	[m_scroller setEnabled:YES];

	if ( inParams.smallVariant == uctrue )
	{
		[m_scroller setControlSize:NSSmallControlSize];
	}

	[m_nativeControl setAutoresizingMask:NSViewMinYMargin];
	[[macWindow contentView] addSubview:m_scroller];
}

Regards,

Jo_______________________________________________

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: Re: [iPhone] How to scroll to UITableView footer view
  • Next by Date: Re: Value Bindings in IB - Where's the documentation?
  • Previous by thread: Re: NSPrintOperation Fails to Auto-Paginate?
  • Next by thread: Re: Strange NSScroller sizing behaviour
  • Index(es):
    • Date
    • Thread