In FWT is it possible to change the content pane of a window at will?
window := Window() window.content = BlueCanvas() ... window.content = RedCanvas()
I'm using the Java / SWT impl and don't seem to able to get the second Canvas to redraw / paint.
Cheers.
yes, should work. need to relayout after; I usually walk up the parent tree with relayout at each level, to be sure.
relayout
for (widget:=parent; widget!=null; widget=widget.parent) { widget.relayout }
(edit: accidental send)
Thanks, it was actually my oversight in the end. My code is more like:
window := Window() window.open window.content = BlueCanvas() ... window.content = RedCanvas()
And window.open blocks until closed! So my canvas's weren't being set until after I closed the window. D'Oh!
window.open
Need to fire off another Actor to manipulate the Window.
See fwt::Desktop.callAsync and fwt::Desktop.callLater too for that
Login or Signup to reply.
SlimerDude Wed 30 May 2012
In FWT is it possible to change the content pane of a window at will?
I'm using the Java / SWT impl and don't seem to able to get the second Canvas to redraw / paint.
Cheers.
KevinKelley Wed 30 May 2012
yes, should work. need to
relayout
after; I usually walk up the parent tree with relayout at each level, to be sure.(edit: accidental send)
SlimerDude Wed 30 May 2012
Thanks, it was actually my oversight in the end. My code is more like:
And
window.open
blocks until closed! So my canvas's weren't being set until after I closed the window. D'Oh!Need to fire off another Actor to manipulate the Window.
Cheers.
brian Wed 30 May 2012
See fwt::Desktop.callAsync and fwt::Desktop.callLater too for that