layout - Vertically expandable Composite -
i'm building swt ui, , has window (shell) 3 composites stacked 1 below other. want that:
- all expand maximum possible width (width of window)
 - the first , third composites have height of 100px each
 - the third composite expand height of 
height_of_parent - 200px - any_margins_or_paddings. 
objective 2 trivial, , did objective 1 using columnlayout defined here.
how impolement objective 3?
 many :)
ps: i'm new swt.
i use gridlayout , this:
gridlayout layout = new gridlayout(); parent.setlayout(layout);  griddata data1 = new griddata(swt.left, swt.fill, false, true); data1.heighthint = 100; widget1.setlayoutdata(data1);  griddata data2 = new griddata(swt.left, swt.fill, false, true); data2.heighthint = 100; widget2.setlayoutdata(data2);  griddata data3 = new griddata(swt.left, swt.top, false, false); data3.heighthint = math.max(1, parent.getsize().y - 200 - layout.marginheight * 2); widget3.setlayoutdata(data3);  parent.addcontrollistener(new controladapter() {     public void controlresized(controlevent e) {         griddata data = (griddata)widget3.getlayoutdata();         data.heighthint = parent.getsize().y - 200 - layout.marginheight * 2;         widget3.setlayoutdata(data);         parent.layout(true);     } });      
Comments
Post a Comment