Halli Hallo,
hab ein Problem. Ich habe eine Tabelle aus mehreren Textfeldern erstellt. Nun möchte ich, dass wenn der Benutzer der Tabelle zu viele Textfelder gibt, dass man sie dann automatisch scrollen kann.
Ich habe es auch schon mit ScrolledComposite versucht, aber das funktioniert leider nicht. Die Scrollbar wird einfach nicht angezeigt.
Das funktioniert leider nicht
Ich bekomme es nur hin wenn diese Tabelle in einem View ist. Da ich aber in einem View mehrere von diesen Tabellen erzeugen möchte, habe ich es noch nicht hin bekommen.
Kann mir da jemand Tipps geben?
Vielen Dank im Vorraus
hab ein Problem. Ich habe eine Tabelle aus mehreren Textfeldern erstellt. Nun möchte ich, dass wenn der Benutzer der Tabelle zu viele Textfelder gibt, dass man sie dann automatisch scrollen kann.
Ich habe es auch schon mit ScrolledComposite versucht, aber das funktioniert leider nicht. Die Scrollbar wird einfach nicht angezeigt.
Java:
GridLayout tableCompositeLayout = LayoutFactory.createInnerGridLayout(fColumnCount);
tableCompositeLayout.horizontalSpacing = fHorizontalSpacing;
tableCompositeLayout.verticalSpacing = fVerticalSpacing;
final ScrolledComposite scrolledComposite = new ScrolledComposite(this, SWT.V_SCROLL);
scrolledComposite.setLayout(LayoutFactory.createGridLayout(1));
Composite tableComposite = new Composite(scrolledComposite, SWT.NONE);
tableComposite.setLayout(tableCompositeLayout);
fCellCount = fColumnCount * fRowCount;
fTextTableCell = new TextTableCell[fCellCount];
for (int i = 0; i < fTextTableCell.length; i++) {
fTextTableCell[i] = new TextTableCell(tableComposite, SWT.NONE, formBased);
}
tableComposite.setSize(fWidth, fHeight);
scrolledComposite.setContent(tableComposite);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(false);
Das funktioniert leider nicht
Ich bekomme es nur hin wenn diese Tabelle in einem View ist. Da ich aber in einem View mehrere von diesen Tabellen erzeugen möchte, habe ich es noch nicht hin bekommen.
Kann mir da jemand Tipps geben?
Vielen Dank im Vorraus