Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [Databinding] Possible to bind the enable property of button
[Databinding] Possible to bind the enable property of button [message #328980] Mon, 09 June 2008 15:38 Go to next message
Eclipse UserFriend
Originally posted by: MeLene3.gmail.com

Hi

I'm using Eclipse 3.3.
I've a button that I only want to have enabled when something is changed.
What is the best way to accomplish this? Is it possible to bind the
enable-property of a button to a boolean in my domain with
DataBindingContext?

Thanks
-Lene
Re: [Databinding] Possible to bind the enable property of button [message #328983 is a reply to message #328980] Mon, 09 June 2008 16:38 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Lene wrote:
> Hi
>
> I'm using Eclipse 3.3.
> I've a button that I only want to have enabled when something is
> changed. What is the best way to accomplish this? Is it possible to bind
> the enable-property of a button to a boolean in my domain with
> DataBindingContext?

You can create an observable on any Control's enabled property like this:
SWTObservables.observeEnabled(aControl)

Then you'll need an observable on the boolean in your domain, and bind
the two together with the SWT observable being the target.

Hope this helps,
Eric
Previous Topic:How to programmatically find resolution of a source plug-in when P2 is enabled?
Next Topic:Plugin dev
Goto Forum:
  


Current Time: Sat May 10 10:15:04 EDT 2025

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

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

Back to the top