java - SWT: Resize Table (height) using a MouseListener -
java - SWT: Resize Table (height) using a MouseListener -
i'm new swt , want create application 2 vertical composites (or somethink that). the composite @ buttom caintains simple table. need variable height finish table - user should determine height using mouse - it's possible resize eclipse views. composite on top should adjust space.
is somethinkg possible swt? if yes, thankful every suggestion.
you can utilize sashform
this. it's user resizable.
here example.
public static void main(string[] args) { final display display = new display(); final shell shell = new shell(display); shell.settext("stackoverflow"); shell.setlayout(new filllayout()); final sashform sashform = new sashform(shell, swt.horizontal); text text1 = new text(sashform, swt.center); text1.settext("text in pane #1"); text text2 = new text(sashform, swt.center); text2.settext("text in pane #2"); final sashform sashform2 = new sashform(sashform, swt.vertical); final label labela = new label(sashform2, swt.border | swt.center); labela.settext("label in pane a"); final label labelb = new label(sashform2, swt.border | swt.center); labelb.settext("label in pane b"); sashform.setweights(new int[] { 1, 2, 3 }); new label(shell, swt.none).settext("label"); shell.pack(); shell.setsize(400, 300); shell.open(); while (!shell.isdisposed()) { if (!display.readanddispatch()) display.sleep(); } display.dispose(); }
java resize swt
Comments
Post a Comment