Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to fill a button totally with an image?
How to fill a button totally with an image? [message #467396] Mon, 30 January 2006 21:01
Edward Kuns is currently offline Edward KunsFriend
Messages: 14
Registered: July 2009
Junior Member
Is there a way to find out the "visible" area of a button? That is, to
do something like button.getBounds() but to get information about what
part of the button you can populate with an image?

By experimentation (and maybe this is documented somewhere but I didn't
find it) I discovered that buttons pay attention to setSize() (or not)
depending on the layout set in their parent. But this is parenthetical.
Anyway, I was able to get a button assume a fixed size, and I can make
an Image that fills the whole button (including the rows and columns of
pixels that indicate if the button is pressed or not). But I would much
prefer to find out the actual *visible* area of the button so I can make
an Image that fills that area. The "client area" if the button, if you
will.

Is there a way to get that information?

Thanks

Eddie
Previous Topic:FOCUS
Next Topic:slow treeitem dispose time
Goto Forum:
  


Current Time: Thu Mar 28 21:04:15 GMT 2024

Powered by FUDForum. Page generated in 0.02085 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top