[futurebasic] Re: [FB] OSX Button Draw bug

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Mon, 17 May 2004 23:52:23 -0400
On Monday, May 17, 2004, at 04:11  PM, Walter Lenk wrote:

> Greetings -
> I have an program that I am migrating to OSX, and so far I have been 
> able to solve all the problems, except one - this involves buttons 
> that are in a window over a PICT.  It all works fine after I made the 
> expected appearance manager changes, but when the program runs in OSX 
> there is a 6 (approx) pixel border ring around the buttons that 
> overwrites the PICT with the (white) background color - this border 
> ring is not there when the same program runs in OS9. This is not a 
> fatal problem, but it would be nice to fix it.
> I am creating the window with:
>  APPEARANCE WINDOW #_wMain, A$, @Rect1, _kDocumentWindowClass,
>                                _kWindowCollapseBoxAttribute, 
> _noAutoFocus
> I am creating the buttons with:
> _Btn1,_activeBtn,0,0,0,B$,@rect2,_kControlPushButtonProc
> I am running OSX 10.3.3 on a 800 MHz iMac, FB release 7.
> Any ideas?
> Thanks,
> Walter

You need a "compositing window" where you embed your PICT in a button 
subview (or other esoteric NeXT madness). RP has an example for this. 
If he doesn't echo back with it, email me, and I'll forward it along.

You'll need to set up the window for the compositing attributes, then 
use a special carbon window handler for the controls after embedding 
your pict in said subview. Such then passes along the control messages 
to FB's regular dialog event handlers.

Weird stuff, and a pain in comparison to the utterly simple old way 
(and a much better old way in this case!)

Of all the things in carbonizing, maintaining any dialog that used to 
use a PICT in the background gave me the most fits, and made me have 
"the most quits" as in just wanting to give up on it all. They 
shouldn't make it that hard.