Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / April 2006

Tip: Looking for answers? Try searching our database.

[SWT] Transparent Canvas

Thread view: 
Bernhard Schandl - 13 Apr 2006 17:20 GMT
Hello!

I am working on a GUI with movable icons, similar to Windows Explorer. I
represent icons as class extended by SWT Canvas. However, I would need
the space around the icon to be transparent. Is there a way to
accomplish this, or should I change design and use something apart from
Canvas?

Thanks and regards,
Bernhard
ducnbyu@aol.com - 15 Apr 2006 00:30 GMT
Sounds like you are heading in the right direction since a Canvas can
have a transparent background, specify style SWT.NO_BACKGROUND in the
constructor.

Here's an example:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets
/src/org/eclipse/swt/snippets/Snippet48.java


Some other useful information, how I navigated to the above, is
available here:

http://www.eclipse.org/swt/widgets/
Bernhard Schandl - 20 Apr 2006 16:56 GMT
> Sounds like you are heading in the right direction since a Canvas can
> have a transparent background, specify style SWT.NO_BACKGROUND in the
> constructor.

Thanks for the hint. When I use SWT.NO_BACKGROUND for a canvas, the
desktop is visible as background of the canvas, instead of the
(non-transparent) canvas that is arranged beyond it. What am I doing wrong?

Regards, Bernhard


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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.