Re: Newbie Controls Question
Re: Newbie Controls Question
- Subject: Re: Newbie Controls Question
- From: David Remahl <email@hidden>
- Date: Thu, 27 Dec 2001 23:51:10 +0100
Let the button call a method in your controller object, that sets a value in
the NSView class. When passing through drawRect:, check the value of this
instance variable and choose what to do based on that...
Note that you will have to do [yourView display]; or [yourView
setNeedsDisplay:YES]; after each button click.
/ Sincerely, David
>
What I would like to do:
>
>
Create several buttons that will each draw a
>
different set of shapes in a given CustomView.
>
>
I already know how to create a subclass of NSView and
>
use the drawRect function to list what I want drawn in
>
this particular view. But how do you set up other
>
lists of graphics commands (ie draw a red square, draw
>
a blue circle) that can be called/activated by
>
different buttons and drawn in the same view space?
>
>
Any help you could give me would be appreciated.
>
>
Alexander
>
Send your FREE holiday greetings online!
>
http://greetings.yahoo.com