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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to