Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem with TableViewer in Column/Table/Browser resizing and scroll bar event.
Problem with TableViewer in Column/Table/Browser resizing and scroll bar event. [message #506341] Thu, 07 January 2010 02:58 Go to next message
tingel christian is currently offline tingel christianFriend
Messages: 46
Registered: December 2009
Member
Hello everyone, It's me again...

I need to display three buttons in just one tableviewer cell and used a TableEditor in a subclass of CellLabelProvider to implement the requirement.

Everything works fine but problem occurs when the tablecolumn or table or browser is resized or scroll bars are moved.

1, When I resize any column in the table viewer but the one containing the customized cell, all related columns are relocated with the resizing event, but all the buttons just stay where they were before resizing...

2, And when I resize the column containing the customized cell, all buttons just get disappeared!

3, The same scenario appears when I maximize the browser or just scroll the horizontal scroll bar.

The first problem has been solved by adding an ControlListener to every column to handle the resizing event, but the rests still remain unsolvable.

So, has anyone ever met with any similar problem as I described above and do you have any ideas to resolve these problems?

Thank you very much!

PS: the version of my rap is 1.2 and browsers are IE8 and firefox 3.5.

[Updated on: Thu, 07 January 2010 08:01]

Report message to a moderator

Re: Problem with TableViewer in Column/Table/Browser resizing and scroll bar event. [message #507379 is a reply to message #506341] Wed, 13 January 2010 09:58 Go to previous message
tingel christian is currently offline tingel christianFriend
Messages: 46
Registered: December 2009
Member
Dudes...:

I am sorry for not trying to search the forums to find some similar thread.

Actually, I found a thread by admin.kabe-farben.ch describing the same problem as I met:

http://www.eclipse.org/forums/index.php?&t=msg&th=37 331

I followed his direction and the problem was partly solved but not all.

I resized my browser(IE8 / firefox 3.5) making the scrollbars of the table visible and scrolled the horizontal one to make the tableEditor visible.functions worked fine till now.But when I maximize the browser at the moment, the editors still stayed where they were before maximizing.

After days and days of research work, I "fixed" the problem today by adding the following code:

class ResizeListener extends ControlAdapter
{
public void controlResized(final ControlEvent e)
{
// column resize.
if (e.getSource() instanceof TableColumn)
{
for (TableEditor editor : editors)
{
editor.layout();
}
return;
}

// table resize.
new Thread()
{
public void run()
{
display.asyncExec(new Runnable()
{
@Override
public void run()
{
for (TableEditor editor : editors)
{
editor.layout();
}
}
});
}
}.start();
}
}

Despite of being looked ugly as the code is, It really works in the way I have long long time expected.

But...the problem still represents randomly at a 10% rate which makes me really crazy...

Come on dudes, I am really in great need of your help...

Any suggestion will be greatly appreciated.

Thank you very very much!
Hontoni Arigato-Gozaimasu!
Dozie Mgoai!
XieXie!!

Orz... Orz... Orz... Orz...
Previous Topic:Is Tabbed Properties View available in a RAP Project
Next Topic:Drag and Drop from view to editor
Goto Forum:
  


Current Time: Mon Nov 29 15:52:44 GMT 2021

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

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

Back to the top