Skip to main content



      Home
Home » Eclipse Projects » GEF » draw2D.Button doesn't support modification for its text
draw2D.Button doesn't support modification for its text [message #165617] Wed, 26 January 2005 01:16 Go to next message
Eclipse UserFriend
Hi,all
1. I'd like to know if there's any document on draw2D?
2. There're so many components in draw2D, currently I don't know which to
use for my Button which supports DirectEdit. It seems that draw2D.Button
doesn't support modification of its name(or text)?

thanks for your advice!

KIND Regards
zbw
Re: draw2D.Button doesn't support modification for its text [message #165776 is a reply to message #165617] Wed, 26 January 2005 18:34 Go to previous messageGo to next message
Eclipse UserFriend
"zbw" <zbw001091@yahoo.com.cn> wrote in message
news:ct7cjs$96j$1@www.eclipse.org...
> Hi,all
> 1. I'd like to know if there's any document on draw2D?

Search the newsgroup. There's plenty of documentation available.

> 2. There're so many components in draw2D, currently I don't know which to
> use for my Button which supports DirectEdit. It seems that draw2D.Button
> doesn't support modification of its name(or text)?

Add a label to the button and set the button's layout manager to be a
StackLayoutManager. Then you can invoke setText() on that label whenever
you want. Make sure you invoke Button's default constructor, and not any of
the ones that take arguments.

>
> thanks for your advice!
>
> KIND Regards
> zbw
>
Re: draw2D.Button doesn't support modification for its text [message #166064 is a reply to message #165776] Fri, 28 January 2005 01:54 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Pratik Shah,
I think I know what should I do now.
^_^

KIND Regards
zbw
Re: draw2D.Button doesn't support modification for its text [message #176786 is a reply to message #166064] Mon, 11 April 2005 20:23 Go to previous message
Eclipse UserFriend
Originally posted by: d.ozsen.blueyonder.co.uk

Alternatively, in case you're subclassing Button, you can invoke the
default Button constructor from your own one and then call the
setContents method, passing it your own Label. You can't call
setContents from outside a subclass of Button though, as it's a
protected method.

D


zbw wrote:
> Thank you Pratik Shah,
> I think I know what should I do now.
> ^_^
>
> KIND Regards
> zbw
>
>

--
Deniz Ozsen

Pers Mail: d.ozsen [at] blueyonder.co.uk
Academ Mail: d.ozsen [at] ucl.ac.uk
Web: http://ozsen.pwp.blueyonder.co.uk
UCL Page: http://www.cs.ucl.ac.uk/students/D.Ozsen
Previous Topic:Getting information from a wizard
Next Topic:Getting the EditPart
Goto Forum:
  


Current Time: Fri Jul 11 21:45:25 EDT 2025

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

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

Back to the top