Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Horizontal scrolling in table with cell editors?(I have questions that can be demonstrated on snippet 52)
Horizontal scrolling in table with cell editors? [message #521767] Thu, 18 March 2010 17:10 Go to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
If you run Snippet052DouleClickCellEditor and resize the window to hide half the rows, and the last column, when you double click to enter and edit a cell, pressing tab will tab to the hidden cell, the table doesn't scroll horizontally to reveal that cell. How do I make it scroll to reveal the cell? It works vertically, such that if you tab down to a row that isn't visible, then it will scroll vertically to show that row.

Also, if after editing, I hit enter to accept or esc. to exit edit mode, how to I setup the activiation support to enter edit mode when I press enter?
Re: Horizontal scrolling in table with cell editors? [message #527314 is a reply to message #521767] Wed, 14 April 2010 19:03 Go to previous messageGo to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
Bump

I've still been unable to figure out how to get a table to scroll horizontally so the active editor is visible.
Re: Horizontal scrolling in table with cell editors? [message #527318 is a reply to message #527314] Wed, 14 April 2010 19:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Which version of Eclipse? I remember having fixed this for 3.5.

Tom

Am 14.04.10 21:03, schrieb Ryan:
> Bump
>
> I've still been unable to figure out how to get a table to scroll
> horizontally so the active editor is visible.
Re: Horizontal scrolling in table with cell editors? [message #527505 is a reply to message #527318] Thu, 15 April 2010 13:32 Go to previous messageGo to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
This is with 3.5.2. Should I file a bug report? Is there a fix I can implement in my code?

Ryan
Re: Horizontal scrolling in table with cell editors? [message #527522 is a reply to message #527505] Thu, 15 April 2010 13:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

Yes file a bug and CC me (I'm not very active any more in 3.x so I might
not fix the bug in 3.6). I think you can fix the bug your own in your
EditingSupport-Class in the meanwhile.

There you should get access to the ViewerCell and you can call
ViewerCell#scrollCellIntoView()

Tom

Am 15.04.10 15:32, schrieb Ryan:
> This is with 3.5.2. Should I file a bug report? Is there a fix I can
> implement in my code?
>
> Ryan
Re: Horizontal scrolling in table with cell editors? [message #527586 is a reply to message #527522] Thu, 15 April 2010 17:02 Go to previous messageGo to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
Thanks Tom,
I had already my own version of ObservableValueEditingSupport to support EMF editing, and in this method:
final protected void initializeCellEditorValue(CellEditor cellEditor, ViewerCell cell) {

I added the line
cell.scrollIntoView()


On the surface, it looks like that call should be added to the EditingSupport abstract class, but then code where the editors are created similar to snippet 52 wouldn't be fixed:
v.setCellEditors(new CellEditor[] { new TextCellEditor(v.getTable()),
				new TextCellEditor(v.getTable()),
				new TextCellEditor(v.getTable()) });
Re: Horizontal scrolling in table with cell editors? [message #527596 is a reply to message #527586] Thu, 15 April 2010 17:08 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
IIRC they are internally wrapped as EditingSupports so when fixing
EditingSupport (or better ColumnViewerEditor which activates the editor
all should be fine)

Tom

Am 15.04.10 19:02, schrieb Ryan:
> Thanks Tom,
> I had already my own version of ObservableValueEditingSupport to support
> EMF editing, and in this method:
> final protected void initializeCellEditorValue(CellEditor cellEditor,
> ViewerCell cell) {
> I added the line
>
> cell.scrollIntoView()
>
> On the surface, it looks like that call should be added to the
> EditingSupport abstract class, but then code where the editors are
> created similar to snippet 52 wouldn't be fixed:
>
> v.setCellEditors(new CellEditor[] { new TextCellEditor(v.getTable()),
> new TextCellEditor(v.getTable()),
> new TextCellEditor(v.getTable()) });
Re: Horizontal scrolling in table with cell editors? [message #527604 is a reply to message #527596] Thu, 15 April 2010 17:51 Go to previous message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
Bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=309363
Previous Topic:Little problem with Toolbar Manager
Next Topic:API Breakage(-ish) in 3.6 M6 ?
Goto Forum:
  


Current Time: Tue Sep 24 02:09:39 GMT 2024

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

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

Back to the top