Skip to main content


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 19:00 Go to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
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] Thu, 23 April 2009 00:14 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
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 12:53 Go to previous message
John Yotka is currently offline John YotkaFriend
Messages: 144
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: Fri Apr 26 17:14:01 GMT 2024

Powered by FUDForum. Page generated in 0.03451 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top