• 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
Re: Newbie Controls Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Newbie Controls Question (From: Alexander Dvorak <email@hidden>)

  • Prev by Date: Re: All those Books
  • Next by Date: Re: UserDefaults (Java)
  • Previous by thread: Newbie Controls Question
  • Next by thread: OpenStep Storage and DPSContext replacements?
  • Index(es):
    • Date
    • Thread