Loading...

objectivej@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Yet another newbie question Randy Luecke Sun Feb 05 17:00:08 2012

Looking at the code, the slider decides if it's vertical if the width
is less than the height. and vice versa. If the height === the width,
then things look really nasty.

On Feb 5, 1:31 pm, Bobby Skinner <[EMAIL PROTECTED]> wrote:
> I figured it out, but it may be a bug. It appears that if the height is 
> greater than 24 then it assumes you want vertical. This seems like a bug, but 
> I have notice some of the other controls behaving unusually if they are 
> taller than their standard value.
>
> On Feb 5, 2012, at 2:41 AM, Bobby Skinner wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I am adding a slider and it is coming up vertical and I am not seeing what 
> > Is wrong. I am still a newbie, so I am sure that I have forgotten something 
> > critical. It is my understanding that it uses the height and width of the 
> > frame
>
> > Here is my code:
>
> >         CPLog.trace( @"[ScreenCanvas setComponent: val] RECT x=" + 
> > rect.origin.x + " y=" + rect.origin.y
> >                         + " width=" + rect.size.width + @"  height=" + 
> > rect.size.height );
>
> >             _componentView = [[CPSlider alloc] initWithFrame: rect];
> >                    [_componentView setMinValue: 0];
> >                    [_componentView setMaxValue: 100];
> >                    [_componentView setObjectValue: 50];
> > /*          [_componentView setAutoresizingMask: CPViewWidthSizable | 
> > CPViewHeightSizable];*/
>
> >                    CPLog.trace( @"slider vertical: " + [_componentView 
> > isVertical] );
>
> >         [self addSubview: _componentView];
>
> > Here is the slider (with the background set to greenColor so i can see the 
> > frame:
> > <PastedGraphic-2.tiff>
>
> > Here is the log output:
>
> > 2012-02-05 02:20:43.181 Cappuccino [trace]: [ScreenCanvas setComponent: 
> > val] RECT x=0 y=0 width=200  height=25
> > 2012-02-05 02:20:43.183 Cappuccino [trace]: slider vertical:
>
> > I am sorry for another newbie question, thanks for your help in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Cappuccino & Objective-J" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/objectivej?hl=en.