Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Button size
Button size [message #543080] Mon, 28 June 2010 07:05 Go to next message
Eclipse UserFriend
Hi all,

I have a question. I create a own Button widget, extended from SWT Button widget. The problem is when I create this widget, the button is resized automaticly and has not more the default size. It is shruked. I don´t resized it or don´t set pack at true. When I create a Button in normal way, the size is normal (Defualt value).
I don´t have any decleration for this differencely Button size.

Do you have any idde?
Re: Button size [message #543234 is a reply to message #543080] Mon, 28 June 2010 13:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mazier,

I'm sorry to say, but extending Button is not permitted. The only SWT
controls that may be subclassed are Canvas and Composite. See [1] for
details.

Why doesn't the standard button work for you? Maybe there's a better
solution.

Regards, Ralf

[1] http://www.eclipse.org/swt/faq.php#subclassing


Maziar Khodaei wrote:
> Hi all,
>
> I have a question. I create a own Button widget, extended from SWT
> Button widget. The problem is when I create this widget, the button is
> resized automaticly and has not more the default size. It is shruked. I
> don´t resized it or don´t set pack at true. When I create a Button in
> normal way, the size is normal (Defualt value). I don´t have any
> decleration for this differencely Button size.
>
> Do you have any idde?
Re: Button size [message #543320 is a reply to message #543234] Tue, 29 June 2010 02:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ralf,

thank you for your answer. No, the button Widget works well. The idee was to change the constructur of button and assign it with a "jface.action", which comprised e.g. text, image, tooltipp etc.

So, now I have to get an other solution for this.

Regards

Maziar
Re: Button size [message #543337 is a reply to message #543320] Tue, 29 June 2010 03:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Maziar,

I don't think that a widget which depends on JFace is a good idea. Why
don't you create a factory for your type of buttons and put that code
into a factory method?

Ralf


Maziar Khodaei wrote:
> Hi Ralf,
>
> thank you for your answer. No, the button Widget works well. The idee
> was to change the constructur of button and assign it with a
> "jface.action", which comprised e.g. text, image, tooltipp etc.
>
> So, now I have to get an other solution for this.
>
> Regards
>
> Maziar
Re: Button size [message #543353 is a reply to message #543337] Tue, 29 June 2010 04:04 Go to previous message
Eclipse UserFriend
Hi Ralf,

OK, I will try it with a factory.

thx a lot.

Maziar
Previous Topic:Get menu activated by JS
Next Topic:Load balancing with Apache mod_proxy
Goto Forum:
  


Current Time: Fri Jul 25 16:09:26 EDT 2025

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

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

Back to the top