Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » where to pack TableColumns on a refresh()?
where to pack TableColumns on a refresh()? [message #446042] Tue, 16 November 2004 15:30 Go to next message
Eclipse UserFriend
Originally posted by: lacougarbage.yahoo.ca

Hi,

I need to refresh a Table (inside a TableViewer) and I wrote a method
that packs my tablecolumns right after I refresh. Doing so gives a
weird behavior when the table gets painted. The columns first shrinks
to the width the tableColumns were defined with and they then get
expanded a fraction of a second later with the pack() method.

Is there anyway I can pack the columns before the display gets updated ?
So far I tried subclassing a TableViewer and override the protected
'refreshInternal(...)' methods but it did not work. Is there any way of
doing this ?



lacou
Re: where to pack TableColumns on a refresh()? [message #446054 is a reply to message #446042] Wed, 17 November 2004 08:18 Go to previous message
Martin Klinke is currently offline Martin KlinkeFriend
Messages: 80
Registered: July 2009
Member
Try switching off the redraw by calling table.setRedraw(false) before
performing the operations

table.setRedraw(false);
try
{
//perform GUI update
}
finally
{
table.setRedraw(true);
}

Maybe that helps for your problem.

"F lacou" <lacougarbage@yahoo.ca> schrieb im Newsbeitrag
news:cnd6es$hmd$1@www.eclipse.org...
> Hi,
>
> I need to refresh a Table (inside a TableViewer) and I wrote a method
> that packs my tablecolumns right after I refresh. Doing so gives a
> weird behavior when the table gets painted. The columns first shrinks
> to the width the tableColumns were defined with and they then get
> expanded a fraction of a second later with the pack() method.
>
> Is there anyway I can pack the columns before the display gets updated ?
> So far I tried subclassing a TableViewer and override the protected
> 'refreshInternal(...)' methods but it did not work. Is there any way of
> doing this ?
>
>
>
> lacou
Previous Topic:how to remove treeitem from tree and then iterator this tree?
Next Topic:JInternalFrame using
Goto Forum:
  


Current Time: Thu Oct 22 06:57:56 GMT 2020

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

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

Back to the top