NSScroller customization

  • Hi,

    I would like to implement a scroller that looks a bit like the
    scroller in iTunes 7.0 when you display the album covers. I have
    tried to subclass NSSlider, and found out that I can draw the knob
    the way I want, but I can't do that for the background of the
    scroller. Has anyone already developed a customized scroller? Is
    there an example somewhere?

    Thanks a lot in advance,

      -- Arthur;

    --
    AstroK Software
    Arthur VIGAN
    <contact...>
  • Why subclass NSSlider when you want to make a custom
    NSScroller? :-) Check out the documentation for NSScroller. You'll
    need to override methods such as -drawArrow:highlight:, -drawKnob:,
    etc. in order to draw your custom scroller parts.

      I don't have any specific examples for you, but the above should
    get you going in the right direction.

    --
    I.S.

    On Oct 13, 2006, at 10:11 AM, AstroK Software wrote:

    > Hi,
    >
    > I would like to implement a scroller that looks a bit like the
    > scroller in iTunes 7.0 when you display the album covers. I have
    > tried to subclass NSSlider, and found out that I can draw the knob
    > the way I want, but I can't do that for the background of the
    > scroller. Has anyone already developed a customized scroller? Is
    > there an example somewhere?
    >
    > Thanks a lot in advance,
    >
    > -- Arthur;
    >
    > --
    > AstroK Software
    > Arthur VIGAN
    > <contact...>
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
    > 40gmail.com
    >
    > This email sent to <idiotsavant2005...>
  • Thanks, but actually I have already tried that! I can draw a cutom
    know with the -drawKnob: method, but -drawArrow:highlight: is never
    called in my subclass, so I can't draw the customized arrows.
    Moreover, it seems that there is no method that draws the track of
    the scroller...

      -- Arthur;

    --
    AstroK Software
    Arthur VIGAN
    <contact...>

    Le 13 oct. 06 à 20:07, I. Savant a écrit :

    >
    > Why subclass NSSlider when you want to make a custom
    > NSScroller? :-) Check out the documentation for NSScroller. You'll
    > need to override methods such as -drawArrow:highlight:, -drawKnob:,
    > etc. in order to draw your custom scroller parts.
    >
    > I don't have any specific examples for you, but the above should
    > get you going in the right direction.
    >
    > --
    > I.S.
    >
    >
    > On Oct 13, 2006, at 10:11 AM, AstroK Software wrote:
    >
    >> Hi,
    >>
    >> I would like to implement a scroller that looks a bit like the
    >> scroller in iTunes 7.0 when you display the album covers. I have
    >> tried to subclass NSSlider, and found out that I can draw the knob
    >> the way I want, but I can't do that for the background of the
    >> scroller. Has anyone already developed a customized scroller? Is
    >> there an example somewhere?
    >>
    >> Thanks a lot in advance,
    >>
    >> -- Arthur;
    >>
    >> --
    >> AstroK Software
    >> Arthur VIGAN
    >> <contact...>
    >>
    >>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
    >> 40gmail.com
    >>
    >> This email sent to <idiotsavant2005...>
    >
    >
  • Take a look at this:

    http://www.koders.com/?
    s=NSScrollerKnobSlot&scope=6QX5RPC8U7ZHAXWDXDRE9FRL2H&la=ObjectiveC

      That's the header file for NSScroller. Scan down toward the bottom
    of the page and note the following method declaration:

    - (void)drawKnobSlot;

      Not everything is in the standard documentation. Sometimes you
    have to dig around in the headers to figure out how things work.

    --
    I.S.

    On Oct 14, 2006, at 10:50 AM, AstroK Software wrote:

    > Thanks, but actually I have already tried that! I can draw a cutom
    > know with the -drawKnob: method, but -drawArrow:highlight: is never
    > called in my subclass, so I can't draw the customized arrows.
    > Moreover, it seems that there is no method that draws the track of
    > the scroller...
    >
    > -- Arthur;
    >
    > --
    > AstroK Software
    > Arthur VIGAN
    > <contact...>
    >
    >
    >
    > Le 13 oct. 06 à 20:07, I. Savant a écrit :
    >
    >>
    >> Why subclass NSSlider when you want to make a custom
    >> NSScroller? :-) Check out the documentation for NSScroller. You'll
    >> need to override methods such as -drawArrow:highlight:, -
    >> drawKnob:, etc. in order to draw your custom scroller parts.
    >>
    >> I don't have any specific examples for you, but the above should
    >> get you going in the right direction.
    >>
    >> --
    >> I.S.
    >>
    >>
    >> On Oct 13, 2006, at 10:11 AM, AstroK Software wrote:
    >>
    >>> Hi,
    >>>
    >>> I would like to implement a scroller that looks a bit like the
    >>> scroller in iTunes 7.0 when you display the album covers. I have
    >>> tried to subclass NSSlider, and found out that I can draw the
    >>> knob the way I want, but I can't do that for the background of
    >>> the scroller. Has anyone already developed a customized scroller?
    >>> Is there an example somewhere?
    >>>
    >>> Thanks a lot in advance,
    >>>
    >>> -- Arthur;
    >>>
    >>> --
    >>> AstroK Software
    >>> Arthur VIGAN
    >>> <contact...>
    >>>
    >>>
    >>>
    >>> _______________________________________________
    >>> Do not post admin requests to the list. They will be ignored.
    >>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>> Help/Unsubscribe/Update your Subscription:
    >>> http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
    >>> 40gmail.com
    >>>
    >>> This email sent to <idiotsavant2005...>
    >>
    >>
    >
  • On Oct 14, 2006, at 9:50 AM, AstroK Software wrote:

    > Thanks, but actually I have already tried that! I can draw a cutom
    > know with the -drawKnob: method, but -drawArrow:highlight: is never
    > called in my subclass, so I can't draw the customized arrows.
    > Moreover, it seems that there is no method that draws the track of
    > the scroller...

    While various hooks are starting to appear (10.4 added more to
    NSButton, e.g.), complete custom drawing of controls is probably not
    possible yet.

    Thus, you'll probably have to grow your own.  If Accessibility is
    important to you, look at a scrollbar via the Accessibility
    Inspector.  You'll see that it's implemented with several AXButton
    areas.  This will help you add the proper support.

    ___________________________________________________________
    Ricky A. Sharp        mailto:<rsharp...>
    Instant Interactive(tm)  http://www.instantinteractive.com
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today