Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Borderless Buttons
Borderless Buttons [message #445482] Sat, 06 November 2004 15:54 Go to next message
Eclipse UserFriend
Originally posted by: michaelh.mjhenderson.com

Hi,
How do I turn off the border on a Button widget?

I have an image I want to be clickable, like a button, but I don't want a
border, just the background color. There's somethin like this used to bring
up help in the plugin.xml editorm Overview section.

Is button the right widget, or do I need a custom widget?

Mike
Re: Borderless Buttons [message #445549 is a reply to message #445482] Mon, 08 November 2004 10:00 Go to previous messageGo to next message
Fabian Wolf is currently offline Fabian WolfFriend
Messages: 96
Registered: July 2009
Member
Michael Henderson wrote:

> Hi,
> How do I turn off the border on a Button widget?
>
> I have an image I want to be clickable, like a button, but I don't want a
> border, just the background color. There's somethin like this used to
> bring up help in the plugin.xml editorm Overview section.
>
> Is button the right widget, or do I need a custom widget?

Hi,

try SWT.FLAT as style flag.

Regards,
Fabian
Re: Borderless Buttons [message #445570 is a reply to message #445549] Mon, 08 November 2004 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michaelh.mjhenderson.com

Fabian Wolf wrote:

> Michael Henderson wrote:
>
>> Hi,
>> How do I turn off the border on a Button widget?
>>
>> I have an image I want to be clickable, like a button, but I don't want a
>> border, just the background color. There's somethin like this used to
>> bring up help in the plugin.xml editorm Overview section.
>>
>> Is button the right widget, or do I need a custom widget?
>
> Hi,
>
> try SWT.FLAT as style flag.
>
> Regards,
> Fabian

I'm already using SWT.FLAT, I still get the border, the button just appears
flat, not 3-D.

Mike
Re: Borderless Buttons [message #445576 is a reply to message #445570] Mon, 08 November 2004 15:53 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
There is no button style that has no borders.

You could try sticking the button in a composite and using
Button.getBorderWidth()
"Michael Henderson" <michaelh@mjhenderson.com> wrote in message
news:cmo2ki$i94$1@eclipse.org...
> Fabian Wolf wrote:
>
>> Michael Henderson wrote:
>>
>>> Hi,
>>> How do I turn off the border on a Button widget?
>>>
>>> I have an image I want to be clickable, like a button, but I don't want
>>> a
>>> border, just the background color. There's somethin like this used to
>>> bring up help in the plugin.xml editorm Overview section.
>>>
>>> Is button the right widget, or do I need a custom widget?
>>
>> Hi,
>>
>> try SWT.FLAT as style flag.
>>
>> Regards,
>> Fabian
>
> I'm already using SWT.FLAT, I still get the border, the button just
> appears
> flat, not 3-D.
>
> Mike
Re: Borderless Buttons [message #445646 is a reply to message #445482] Mon, 08 November 2004 16:00 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The rendering of buttons is done by the theme manager. You will need a
custom widget if you really want the mouse bevhaior of a button (ie press,
let go with mouse inside the button to select). Alternately, you could use
an SWT.FLAT tool bar. This may be what you are seeing in the Eclipse UI.

"Michael Henderson" <michaelh@mjhenderson.com> wrote in message
news:cmitsn$jvj$2@eclipse.org...
> Hi,
> How do I turn off the border on a Button widget?
>
> I have an image I want to be clickable, like a button, but I don't want a
> border, just the background color. There's somethin like this used to
bring
> up help in the plugin.xml editorm Overview section.
>
> Is button the right widget, or do I need a custom widget?
>
> Mike
>
Previous Topic:How to open a specific help page programatically.
Next Topic:NullPointerException in MessageDialog: SWT cannont find the standard dialog icons
Goto Forum:
  


Current Time: Thu Oct 22 17:54:42 GMT 2020

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

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

Back to the top