Li Chen 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
Li Chen 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).