[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Accessibility issue with Image Button

You should just set the image on the Button and add an AccessibleListener to
provide the text to be spoken.  AccessibleListener is demonstrated in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet164.java?view=co .

Grant


"Rajesh Adukkadukkath" <rajesh.nair@xxxxxxxxxx> wrote in message
news:66093826f8cc555879c44eca88e09411$1@xxxxxxxxxxxxxxxxxx
> I have the following code to add a button as part of my eclipse 3.0
> application.
>
> Click = new Button(top, SWT.NONE);
> Click.setBounds(new Rectangle(87, 52, 87, 42));
> Image image = new Image(parent.getDisplay(), "c:/tag_4.gif");
> Click.setText("Click Me");
> Click.setImage(image);
> Click.setToolTipText("Click Me Tooltip");
>
> The button will be displayed with only the Image. The Text "Click Me" will
> not be shown in the button. But when I use accessibilty tools, I can use
> the button read as "Click Me Push Button" in my earphone.
>
> This was exactly the bahaviour i wanted to implement.
>
> Later I have upgraded the same code in to Eclipse 3.2 platform.
>
> There is an issue here. With the same code I am getting both Image and
> Text displayed on the Button. I actually want only the image to be
> displayed. I can avoid setting the setText(), but this cause an
> accessibility issue by reading the button as "Blank push button".
>
> Can some body help me here ?
>
> Warm Regards,
> Rajesh
>
>