layout - Vertically expandable Composite -


i'm building swt ui, , has window (shell) 3 composites stacked 1 below other. want that:

  1. all expand maximum possible width (width of window)
  2. the first , third composites have height of 100px each
  3. 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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -