How to re-layout controls in a view [message #535092] |
Fri, 21 May 2010 05:42  |
Eclipse User |
|
|
|
Hi all,
I don't know if this is the right forum for posting my problem, but I consider it is strongly related to SWT.
I have the following situation:
I created an Eclipse ViewPart with a RowLayout. I use the RowLayout to layout several Canvas on the view. This works like expected and looks like this
Canvas 1 | Canvas 2 | Canvas 3
Canvas 4 | Canvas 5 | Canvas 6
The user is now able to dispose such a Canvas. This works also, but the problem now is, if I dispose Canvas 2 there is free space in the view. What I want is, that I can rearrange the Canvas-objects programatically. The view does it itself if you resize or minimize and maximize it again.
But what do I have to write, that it is automatically done, if the Canvas is disposed?
I tested the following, but it does not work (Widget is my own extension of Canvas):
((Widget)w).dispose();
Widget[] controls = {(Widget)w};
this.parent.changed(controls);
this.parent.layout(true, true);
this.parent.update();
Maybe someone can help or give a hint?
Bjoern
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04215 seconds