## [futurebasic] re: Transparent Edit Fields

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1998 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <WEdwards@...>
Date: Fri, 18 Dec 1998 09:55:32 -0500
SNIP

Date: Thu, 17 Dec 1998 13:04:59 -0700
To: futurebasic@...
From: scram@... (Stu Cram)
Subject: Transparent Edit Fields
Message-Id: <v01530501b29f13999693@[10.100.61.46]>

I'm trying to have treansparent edit fields in a FB/PG program so that
the
colour of a backgroud object will show through but can't figure it out.
Probably some little step I've overlooked.
Any help is appreciated.
TIA

END SNIP

I dont know you just want the background color of the edit field to
match the background pattern of the window or you want to add a picture
to the background.

If you want the pattern to match in PG you would choose the window
menu\text&texture then choose the background that you want.  In straight
FB you would get the resource of the ppat that you want using ppat& =
GETPIXPAT(rsrcID) then CALL BACKPIXPAT(ppat&) then call RGBBACKCOLOR to
match the dominant color of your ppat.  If your ppat is multicolored,
when you hilited the edit field only the background colors that match
the windows backcolor will be hilited so be careful of the background
pattern and backcolor that you use.

If you want to put a picture in the background of the edit field I dont
have an easy solution for you.    There is a quickdraw call that needs
to be patched so that eraserect isnt called when TEUPDATE is called.
There is a program on the apple website called TEOVERBACKGRND.C or
something very close to this that does what you want, (if thats what you
want).  If never converted the program as I've wanted to do before.
That and some other C code examples.  If you read C thats great but even
if you dont, I *think* its intuitive enough that you can extract the
necessary info to pull it off.

Hope it helps,

W.