Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] setSelection(1) not triggering widgetDefaultSelected event


In addition to what Steve said, note also that buttons (push buttons, radio buttons) don't ever get the DefaultSelection event - they just get Selection. See the javadoc for Button.addSelectionListener.

You might want to look into Display.post for your automated testing.
See the 2 examples on the SWT snippets page, under "Display".
http://www.eclipse.org/swt/snippets/

Carolyn



Steve Northover/Ottawa/IBM@IBMCA
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

11/03/2005 11:11 AM

Please respond to
"Eclipse Platform SWT component developers list."

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-swt-dev] setSelection(1) not        triggering        widgetDefaultSelected event






In SWT, programatically changing the selection does not send an event.  I'll write a FAQ on this one day ...



"Willenbring, Gary V." <GARY.V.WILLENBRING@xxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

11/02/2005 09:06 AM

Please respond to
"Eclipse Platform SWT component developers list."

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] setSelection(1) not triggering        widgetDefaultSelected event







When I do a

cmd1.setSelection(1)

where cmd1 is a button or radio button the graphical object selection
changes as if the user selected it with the mouse.  However the underlying
event widgetDefaultSelected() is not kicked off as I had expected.  Is this
a bug or a lack of understanding of how this should work on my part?  I was
looking at this for doing some automated user interaction for testing.

Thanks,

Gary
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top