• 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
Overriding NSSlider/NSSliderCell: continued
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overriding NSSlider/NSSliderCell: continued


  • Subject: Overriding NSSlider/NSSliderCell: continued
  • From: email@hidden
  • Date: Mon, 11 Feb 2002 12:00:25 -0800

I'm still working on overriding NSSlider and NSSliderCell to change the
knob for specific uses and the behavior to select ranges of values also.

Right now, I'm just overriding the drawBar, the drawInteriorWithFrame,
and I created a new NSImageCell for the knob (with great help from
GNUStep-GUI). I created a palette for that widget, but when I drop it on
a window in IB, I can only resize it on its width: Height is constrained
to 21 pixels as soon as I touch it.

I've looked in the tree of classes to find out which method would do
that. Didn't find it in NSCell nor NSControl. Double checked all the
public methods for NSSlider and NSSliderCell: nothing regarding size.

Somebody has got clues regarding this strange behavior? Maybe is it more
simply IB related?

I believe IB does this because you are a subclass of NSSlider, and I believe IB is simply hard-coded to know that NSSlider (and, it assumes, all subclasses) have such a fixed height. AFAIK there is no way to change this in IB. Log a bug, I guess. I think this is perhaps a promising area for IB to add functionality: being able to provide information to IB about things like target/action outlets, other attributes, sizing characteristics, etc. for custom classes, to make them behave just as intelligently in IB as the built-in ones.
You may be able to do some of this by writing your own palette; I haven't looked at that stuff.

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: toolbar and switching a NSView
  • Next by Date: Re: NSSliderCell private variables
  • Previous by thread: Overriding NSSlider/NSSliderCell: continued
  • Next by thread: mount command
  • Index(es):
    • Date
    • Thread