Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Adding Images Dynamically on button click


Please note that swt usage questions like this should be asked on the eclipse.platform.swt newsgroup, not on this mailing list.

You need to:
- listen for a selection event on the Tree, see http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java?view=co
- when an event is received, make whatever state change is needed to make your Canvas's Paint listener draw its new content, and then use Canvas.redraw(...) to do the update, see http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet275.java?view=co

Grant

Back to the top