addition to locate arrow buttons [message #494050] |
Wed, 28 October 2009 18:50  |
Eclipse User |
|
|
|
I needed something to press an arrow button in a custom widget. I ended up adding an arrowButton lookup in SWTBot. Is there some reason this style wasn't being supported? Maybe the style should be passed around as a parameter to all the other forms of button lookup.
public SWTBotButton arrowButton(int index) {
Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.ARROW, "SWT.ARROW"));
return new SWTBotButton((Button) widget(matcher, index), matcher);
}
|
|
|
Re: addition to locate arrow buttons [message #494056 is a reply to message #494050] |
Wed, 28 October 2009 21:39  |
Eclipse User |
|
|
|
It's not just about the SWT.ARROW style, the drop down and event
notifications for arrow buttons is different from normal buttons.
One would need an SWTBotArrowButton for an arrow button
--
Ketan
studios.thoughtworks.com | twitter.com/ketanpkr
-
When does later become never?
On 29/10/09 4:20 AM, Jay Norwood wrote:
> I needed something to press an arrow button in a custom widget. I ended
> up adding an arrowButton lookup in SWTBot. Is there some reason this
> style wasn't being supported? Maybe the style should be passed around as
> a parameter to all the other forms of button lookup.
>
> public SWTBotButton arrowButton(int index) {
> Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.ARROW,
> "SWT.ARROW"));
> return new SWTBotButton((Button) widget(matcher, index), matcher);
> }
>
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds