SWT - Custom Controls?

C

Claus K.

Hello everyone,

I need to implement some controls on my own (for example, text + image
button with extended mouse functionality) for some pet project. I
would like to use SWT.

I have not understood completely which class to extend. Do I use
Component or do I use Control?

Is there a good example somewhere, especially for the drawing part?
Most examples I saw just painted on the shell itself, not on a control
as child of a shell...

Do I have to re-implement paint() and paint text and image in the
controls rectangle and this will be good, or am I missing something?
 
J

Jeff Higgins

Claus said:
Hello everyone,

I need to implement some controls on my own (for example, text + image
button with extended mouse functionality) for some pet project. I
would like to use SWT.

I have not understood completely which class to extend. Do I use
Component or do I use Control?

Is there a good example somewhere, especially for the drawing part?
Most examples I saw just painted on the shell itself, not on a control
as child of a shell...

Do I have to re-implement paint() and paint text and image in the
controls rectangle and this will be good, or am I missing something?
A web search using the terms "swt create custom widget"
produces a link to "Creating Your Own Widgets using SWT"
<http://tinyurl.com/5nyeo>.

Kind of old, but probably a good start.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top