|
Re: Button size [message #543234 is a reply to message #543080] |
Mon, 28 June 2010 17:56 |
|
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 #543337 is a reply to message #543320] |
Tue, 29 June 2010 07:19 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02798 seconds