N'abend zusammen,
Habe gerade das Problem, daß in meinem Composite das Layout keinen Zeilenumbruch machen will.
Jetzt habe ich 30 Label in einer Zeile und sehe nur die Hälfte, weil das Composite sich nicht beliebig breit machen darf.
Was muss ich tun, damit das Composite nen Zeilenumbruch macht ?
Mein Code:
Gruß,
ich_wills_wissen
Habe gerade das Problem, daß in meinem Composite das Layout keinen Zeilenumbruch machen will.
Jetzt habe ich 30 Label in einer Zeile und sehe nur die Hälfte, weil das Composite sich nicht beliebig breit machen darf.
Was muss ich tun, damit das Composite nen Zeilenumbruch macht ?
Mein Code:
Code:
c3 = new Composite(MonthTableComposite, SWT.NONE);
RowLayout rowLayout3 = new RowLayout();
rowLayout3.wrap = true;
rowLayout3.pack = true;
rowLayout3.justify = true;
rowLayout3.type = SWT.HORIZONTAL;
rowLayout3.marginLeft = 5;
rowLayout3.marginTop = 5;
rowLayout3.marginRight = 5;
rowLayout3.marginBottom = 5;
rowLayout3.spacing = 20;
c3.setLayoutData(monthLayoutData); // Monthlayout ist GridData, das composite liegt in einem anderen, in
// dem ein GridLayout das sagen hat
c3.setLayout(rowLayout3);
Gruß,
ich_wills_wissen