Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsQuery on creating Controls using the SWT Accessibility API
https://www.eclipse.org/forums/index.php/mv/msg/55391/176081/#msg_176081
Originally posted by: melangov.in.ibm.com
Hi.,
I am trying to develop controls which is compatible and readable by IBM
HomePageReader(Desktop Reader),
Firstly i used SWT Accessibility API (org.eclipse.swt.*) to create
controls such as Checkbox and Labels.
For eg : Consider wizard having 2 controls
Label Control Type
===== ===========
COA unchecked Checkbox
OfferLetter combobox
The desktop reader reads the message as follows ( COA --- unchecked
checkbox ---- COA ----Offerletter )
COA is read twice instead of once at the start.
It is reading the label ,checkbox and again the name of the first label
and then the other label...
Here,the first label is read twice...
So,as to fix this issue,I tried creating the label in the following way...
final Label label_15 = new Label(container, SWT.NONE);
access=label_15.getAccessible();
final FormData formData_34 = new FormData();
formData_34.bottom = new FormAttachment(0, 395);
formData_34.right = new FormAttachment(label_13, 135,
SWT.LEFT);
formData_34.top = new FormAttachment(0, 375);
formData_34.left = new FormAttachment(label_13, 0,
SWT.LEFT);
label_15.setLayoutData(formData_34);
access.addAccessibleListener(new AccessibleAdapter(){
public void getName(AccessibleEvent arg0) {