Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Toogle Button NO_FOCUS
Toogle Button NO_FOCUS [message #890170] Thu, 21 June 2012 07:11 Go to next message
Eclipse UserFriend

I have a problem with Focusable Buttons on Eclipse Rap. I have defined some Toogle buttons with some css style when your mouse is over it, with it is selected and when it is not. The thing is the focus on the button is making it look odd.

I have tried
btnAnimals = new Button(panel, SWT.TOGGLE | SWT.NO_FOCUS);

with no exit. And finally I decided to implement a FocusAdapter for the buttons:

FocusListener focusListener = new FocusAdapter() {
        @Override
        public void focusGained(FocusEvent event) {
            txtStreet.setFocus();
        }
    };
    btnAnimals.addFocusListener(focusListener);


The strange issue that this listener is only called ONCE. Do you know what I am doing wrong? Is it a bug?

Thanks in advance
Re: Toogle Button NO_FOCUS [message #891508 is a reply to message #890170] Mon, 25 June 2012 02:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
according to the documentation SWT.NO_FOCUS is not available for Button.
Ofcourse, you could remove the focus related styling by overriding the
Button-FocusIndicator definitions.
HTH,
Ivan


On 6/21/2012 2:11 PM, David Casas wrote:
>
> I have a problem with Focusable Buttons on Eclipse Rap. I have defined
> some Toogle buttons with some css style when your mouse is over it,
> with it is selected and when it is not. The thing is the focus on the
> button is making it look odd.
>
> I have tried
>
> btnAnimals = new Button(panel, SWT.TOGGLE | SWT.NO_FOCUS);
>
> with no exit. And finally I decided to implement a FocusAdapter for
> the buttons:
>
>
> FocusListener focusListener = new FocusAdapter() {
> @Override
> public void focusGained(FocusEvent event) {
> txtStreet.setFocus();
> }
> };
> btnAnimals.addFocusListener(focusListener);
>
>
> The strange issue that this listener is only called ONCE. Do you know
> what I am doing wrong? Is it a bug?
>
> Thanks in advance
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Toogle Button NO_FOCUS [message #891554 is a reply to message #891508] Mon, 25 June 2012 04:29 Go to previous message
Eclipse UserFriend
Thank you so much Ivan, I did'nt realised that. You help me a lot Smile
Previous Topic:The RAP incubator multi-header table controls, like to the Nebula Grid widget?
Next Topic:Webapplication content parsable by Google
Goto Forum:
  


Current Time: Tue Jun 24 01:19:54 EDT 2025

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

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

Back to the top