Changing FWT Window Content
KevinKelley
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.
for (widget:=parent; widget!=null; widget=widget.parent) {
widget.relayout
}
(edit: accidental send)
SlimerDude
30 May 2012
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!
Need to fire off another Actor to manipulate the Window.
Cheers.
brian
30 May 2012
See fwt::Desktop.callAsync and fwt::Desktop.callLater too for that
SlimerDude
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.