Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT
SWT [message #436203] Wed, 12 May 2004 20:19 Go to next message
Eclipse UserFriend
Originally posted by: am560571.wcupa.edu

I am wondering how to make a custom SWT component. I want it to act much
like the package explorer in eclipse. Where I could put a tree, list,
buttons, ect.. in the main area. Then have a top with a lable, menubar,
and toolbar. I would also need to have dragging and dropping, and am able
to resize the component. My main problem is I am not sure how to create a
custom component and what widgets to use. Thank you for the help
Later,
whatsgoingon
Re: SWT [message #436247 is a reply to message #436203] Thu, 13 May 2004 17:39 Go to previous message
Eclipse UserFriend
Originally posted by: friederich.kupzog.de

Hello whatsgoingon,

here some suggestions:
You do not need to write your own widget. You can write a wrapper class
that manages all the (existing) widgets you need.

Widgets to use:
Tree -> Tree
List -> List or Table
Buttons -> ToolBar with ToolItems or just Button
Lable -> Label or CLabel

Perhaps you play a bit with SWT Designer. Maybe this helps you to
understand how the Widgets are created and layouted.
Then you can write a wrapper class that does all this.
To let it look like a single SWT Widget, you can create all important
functions (setColor, addListener etc) by using Eclipse's
Source->generate delegate methods feature and delegating these calls to
the widgets that should handle them.

It also could be helpful to have a look into the eclipse source, but
this is of course time consuming if one does not know exactly where to
search.

Hope that helped
Friederich

whatsgoingon wrote:

> I am wondering how to make a custom SWT component. I want it to act much
> like the package explorer in eclipse. Where I could put a tree, list,
> buttons, ect.. in the main area. Then have a top with a lable, menubar,
> and toolbar. I would also need to have dragging and dropping, and am able
> to resize the component. My main problem is I am not sure how to create a
> custom component and what widgets to use. Thank you for the help
> Later,
> whatsgoingon
>


--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
Previous Topic:cell color in JFace?
Next Topic:How to create a vertical toolbar?
Goto Forum:
  


Current Time: Thu Apr 25 17:50:02 GMT 2024

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

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

Back to the top