[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Graphics Context doesn't work!
|
- From: jerome.gout@xxxxxxxxx (Jerome Gout)
- Date: Fri, 8 Jul 2005 13:12:26 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hello,
If your goal is to draw something (a line) in a Composite added to a page
of an editor or anywhere else you need to add a PaintListener to your
composite:
..
composite.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent event) (
GC gc = event.gc;
gc.drawLine(0,0,200,200);
)
});
The GC to use is the one provided by the PaintEvent instance.
Hope this helps you
Jerome