Combo box with icons, hierarchy [message #452602] |
Wed, 23 March 2005 01:44 |
Eclipse User |
|
|
|
Originally posted by: freddie_nurke.hotmail.com
Hi everyone,
I'm creating a combo box that has a Table rather than a List in its
dropdown Shell. I'm doing this for two reasons: I want to add icons to
the combo, and I want to show hierarchy. My dropdown contents should
look like this:
* Parent 1
# Child 1.1
# Child 1.2
# Child 1.3
& Parent 2
+ Child 2.1
+ Child 2.2
where random punctuation represents icons.
I'd like some advice on the best way to attack this problem to effect as
much code reuse as possible. I can't really extend
org.eclipse.swt.widgets.Combo because the underlying data representation
is different -- it's now more than just a list of strings. In MFC I'd
intercept the AboutToDropDown notification and draw my own control below
the combo, but I don't know if I can do that in SWT. I expect,
eventually, to use this control in a JFace Viewer with a label provider
and all that good stuff.
Any suggestions or existing examples would be much appreciated.
Thanks,
Fred.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04310 seconds