Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Draw SWT widget on SWT canvas
Draw SWT widget on SWT canvas [message #1094750] Mon, 26 August 2013 06:21 Go to next message
Li Chen is currently offline Li ChenFriend
Messages: 20
Registered: July 2011
Location: Sydney
Junior Member
Hi, Just want to ask whether it is possible to draw an SWT widget (like a spinner) on an SWT canvas and specify x, y position in canvas to draw.
Thanks Smile
Re: Draw SWT widget on SWT canvas [message #1095388 is a reply to message #1094750] Tue, 27 August 2013 02:02 Go to previous message
Li Chen is currently offline Li ChenFriend
Messages: 20
Registered: July 2011
Location: Sydney
Junior Member
Hi, I think I find out how to do it, first declare:
Button btn = new Button(canvas, SWT.PUSH);
then hide it, btn.setVisible(false);
and whenever you want to show it, first set the position:
btn.setBounds(x,y, width, height);
Then, btn.setVisible(true).
Previous Topic:JavaFX the easiest way to get a HTML5 browser in a SWT app?
Next Topic:Outlook E-Mail
Goto Forum:
  


Current Time: Mon Dec 22 00:03:53 GMT 2014

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

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