Table Scrollbar [message #467106] |
Wed, 25 January 2006 09:54 |
Tony Messages: 52 Registered: July 2009 |
Member |
|
|
I have a table component in a plug-in project generated by eclipse. The
problem is that the table needs a horizontal scrollbar, and the scrollbar
shows only after the view which contains the table is resized. How can I
make that the scroll bar is visible from the beginning?
The table is in a view.
Here is the code sequence:
public void createPartControl(Composite parent) {
initControls(parent);
// initViewer(parent);
}
private void initControls(Composite parent){
...
table = new Table(main, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL);
table.setVisible(false);
...
}
private void fillCarsTable(CarModel model){
...
table.setVisible(true);
table.pack();
...
}
If I do not use the pack function than the scroll is visible, but then I
have to find out myself the right dimesions for the table, which I do not
really like.
Thanks,
Tony
|
|
|
Powered by
FUDForum. Page generated in 0.02820 seconds