Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / September 2004



Tip: Looking for answers? Try searching our database.

Tinting a dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Bettis - 24 Sep 2004 12:57 GMT
Hi folks,

Here's a good one. The client I'm working for would like the dialogs of
their app 'tinted' to indicate their contents - a pale wash of colour
over the usual grey (or rippled for Aqua). I don't mind the dialog
frame, bittons etc. being unchanged, I just need a translucent tint over
the content area. Is this possible without writing a new window
definition? It seems like it will be tricky under X with controls
drawing their surrounding area, but I could live with it under Classic
only.

Ta.

Rev. Andy
David Phillip Oster - 24 Sep 2004 16:30 GMT
> Here's a good one. The client I'm working for would like the dialogs of
> their app 'tinted' to indicate their contents - a pale wash of colour
[quoted text clipped - 4 lines]
> drawing their surrounding area, but I could live with it under Classic
> only.

Have you considered putting a translucent tinted window on top of it? if
it is transparent enough, mouse clicks will go right through.
Bryan Pietrzak - 27 Sep 2004 19:39 GMT
> Here's a good one. The client I'm working for would like the dialogs of
> their app 'tinted' to indicate their contents - a pale wash of colour
[quoted text clipped - 4 lines]
> drawing their surrounding area, but I could live with it under Classic
> only.

This would be trivial to do with compositing windows in Carbon. In a
composited window, the controls don't "draw/erase" their surrounding
areas.

If composite windows are not an option, it is still possible to put a
background brush of a specified color on a window. If you need it to
be a tint of of the normal OS X window backgrounds, that'll be
trickier and will require patching out the QD bottlenecks on the port
to override the erase operation. Search the carbon-dev archives, I've
posted code how to put an arbitrary image in the background of an OS X
window with controls on top.

Bryan
Andy Bettis - 27 Sep 2004 23:45 GMT
> > Here's a good one. The client I'm working for would like the dialogs of
> > their app 'tinted' to indicate their contents - a pale wash of colour
[quoted text clipped - 16 lines]
> posted code how to put an arbitrary image in the background of an OS X
> window with controls on top.

Turned out that the user was happy with a plain coloured background, so
setting the background colour for the window was OK.

Sometimes it's simpler than you think.

Rev. Andy
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.