Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » how to get toggle button state
how to get toggle button state [message #335704] Wed, 22 April 2009 15:00 Go to next message
John Yotka is currently offline John Yotka
Messages: 143
Registered: July 2009
Senior Member
I'm using an ActionDelegate to catch the press/unpress of a toggle
button. I see that the runWithEvent method fires every time you
press/unpress the toggle button. I've inspected the "event" item and
see that the "widget" in the event has a "data" item that has a property
called "checkedState", which appears to indicate if the button is
depressed or undepressed. I am unable to determine how to access this
property. any help would be greatly appreciated.
Re: how to get toggle button state [message #335709 is a reply to message #335704] Wed, 22 April 2009 20:14 Go to previous messageGo to next message
Ben Vitale is currently offline Ben Vitale
Messages: 247
Registered: July 2009
Senior Member
I haven't worked with ActionDelegates much but runWithEvent has an
IAction parameter. Have you tried action.isChecked()?

Regards,
Ben

John Yotka wrote:
> I'm using an ActionDelegate to catch the press/unpress of a toggle
> button. I see that the runWithEvent method fires every time you
> press/unpress the toggle button. I've inspected the "event" item and
> see that the "widget" in the event has a "data" item that has a property
> called "checkedState", which appears to indicate if the button is
> depressed or undepressed. I am unable to determine how to access this
> property. any help would be greatly appreciated.
Re: how to get toggle button state [message #335721 is a reply to message #335709] Thu, 23 April 2009 08:53 Go to previous message
John Yotka is currently offline John Yotka
Messages: 143
Registered: July 2009
Senior Member
Ben Vitale wrote:
> I haven't worked with ActionDelegates much but runWithEvent has an
> IAction parameter. Have you tried action.isChecked()?
>
> Regards,
> Ben
>
> John Yotka wrote:
>> I'm using an ActionDelegate to catch the press/unpress of a toggle
>> button. I see that the runWithEvent method fires every time you
>> press/unpress the toggle button. I've inspected the "event" item and
>> see that the "widget" in the event has a "data" item that has a
>> property called "checkedState", which appears to indicate if the
>> button is depressed or undepressed. I am unable to determine how to
>> access this property. any help would be greatly appreciated.
Ben,

thanks for the info but action.isChecked() always returns false,
regardless of the state of the button (press/unpress).
Previous Topic:Query on platform UI editors
Next Topic:Retarget Actions listening to model changes
Goto Forum:
  


Current Time: Thu Apr 17 14:37:21 EDT 2014

Powered by FUDForum. Page generated in 0.03742 seconds