Re: NSApplicationMain question
Re: NSApplicationMain question
- Subject: Re: NSApplicationMain question
- From: Bill Appleton <email@hidden>
- Date: Mon, 26 Apr 2010 07:23:24 -0700
hi all,
so in the NSScroler docs there is no way to set the min, max, and value --
that is the problem
there is a way to set the proportion of the page...
or am i missing something?
thx
On Mon, Apr 26, 2010 at 7:06 AM, Paul Sanders <email@hidden>wrote:
> > did anyone have some more color on question (2) the need to create a
> raw
> > NSScroller and control it like a NSSlider (min, max, value, proportion)
> is
> > that possible?
>
> Yes, just instantiate it and call initWithFrame. Then add it to your
> window's content view, which will retain it so you can release it. Other
> than that, consult the NSScroller docs (and read up on the target/action
> mechanism for NSControls so that you can catch events generated by the
> scroller).
>
> Addendum to my earlier post: requests to draw come though your content
> view's drawRect: method (or said method of any subviews thereof), so yu can
> use that to trigger the drawing of any 'bare metal' widgets. To force a
> redraw, call setNeedsDisplay or setNeedsDisplayInRect: on your content view.
>
> I learnt all this stuff by reading about it and by experimenting with my
> toy Cocoa app... It's a method that works. Apple's Cocoa framework docs
> are actually very good. They should all have been installed with Xcode.
>
> Paul Sanders.
>
>
_______________________________________________
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