Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table Scrollbar
Table Scrollbar [message #467106] Wed, 25 January 2006 09:54
Tony is currently offline TonyFriend
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
Previous Topic:Browser sometimes shows HTML source instead of rendering
Next Topic:How to apply a different style to a specific child in a tree ?
Goto Forum:
  


Current Time: Fri Sep 20 04:00:20 GMT 2019

Powered by FUDForum. Page generated in 0.01536 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top