[haiku-development] Re: RoundRect ButtonFrame

  • From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 25 Mar 2012 15:59:26 -0700

On Sun, Mar 25, 2012 at 05:49:44PM -0400, John Scipione wrote:
> On Mar 25, 2012, at 5:40 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>  
> wrote:
> >>If your custom buttons do their own drawing then it shouldn't be a
> >>problem, this only applies to buttons drawn by ControlLook.
> >
> >Well, no.  That's the thing.  I call the standard BButton::Draw(),  
> >and then
> >add stuff on top  (a persistent state representation).  Probably no
> >conflict in this particular case, but you never know.
> 
> Well you shouldn't do that, you should copy the Draw code from  
> BControlLook and the modify it from there.

That is *exactly* contrary to the concept of deriving from the base class!!
You don't copy code -- you use it!

        -- Pete --

Other related posts: