[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.actf] Re: Accessible name?

Wayne:
Sorry for this delayed response but have been traveling quite a bit and on vacation this week.


The accessibleNmae on the Composite is missing bc Composite's simply do not have an accessible name associated with them by default. This is a bug in the validation document for SWT. You can, however, corect the error by getting the accessible for the Composite and overwriting the getName method:
public MyComposite (Composite parent, int style) {
super(parent, style);
getAccessible().addAccessibleListener(new AccessibleListener() {
public void getName (AccessibleEvent event) { event.result = "composite name"; }
:
} });


For the text field, the validation is correct as the only way to get a name for a text field is to asssociate itwith a label. Add a Label to the composite prior to adding the Text object and this should repair that error.