Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » ComboBoxCellEditor flickering
ComboBoxCellEditor flickering [message #1185698] Thu, 14 November 2013 07:51 Go to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
Hi.
I am using ComboBoxCellEditor in my NatTable.
When clicking on edited cell the editor first appears in left top corner of the table and then moves to right location.
It is not critical, but still would be nice to be avoided.
Is there any way to overcome it?
Re: ComboBoxCellEditor flickering [message #1185721 is a reply to message #1185698] Thu, 14 November 2013 08:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
I can not confirm that behaviour. There is no such behaviour in the examples. At least not in the current pushed codebase.

What version of NatTable are you using? Which platform?
Re: ComboBoxCellEditor flickering [message #1185722 is a reply to message #1185721] Thu, 14 November 2013 08:14 Go to previous messageGo to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
I am using version 1.0.1 on Windows XP.
Re: ComboBoxCellEditor flickering [message #1185738 is a reply to message #1185722] Thu, 14 November 2013 08:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
Is it also true for the NatTable examples or does it just happen on your machine?
Re: ComboBoxCellEditor flickering [message #1185785 is a reply to message #1185738] Thu, 14 November 2013 09:06 Go to previous messageGo to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
It happens in examples as well.

http://i42.tinypic.com/2up5pnn.png
Re: ComboBoxCellEditor flickering [message #1185800 is a reply to message #1185785] Thu, 14 November 2013 09:19 Go to previous messageGo to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
And it is SWT / JFace 3.7
Re: ComboBoxCellEditor flickering [message #1185812 is a reply to message #1185800] Thu, 14 November 2013 09:29 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
Hm, I'm running the examples on Windows 7 and got SWT 3.7.2 ... not sure if that is relevant.

What happens on opening an editor is that it gets created at position 0,0 and then the position and size is calculated and applied regarding the cell position. Not sure why in your case you are noticing that. Haven't seen or heard of that before.
Re: ComboBoxCellEditor flickering [message #1185860 is a reply to message #1185812] Thu, 14 November 2013 10:09 Go to previous messageGo to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
I am running the application through remote desktop, so probably this is the reason why I notice it.
So the question is whether it is possible to position the control before displaying it.
Re: ComboBoxCellEditor flickering [message #1185867 is a reply to message #1185860] Thu, 14 November 2013 10:14 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
That would mean to change the NatTable framework code. If you want to dig into that deeps, have a look at EditController.editCell(), but personally I don't want to change that code in the current architecture as there are a lot of use cases to verify and I'm not sure what breaks by changing it.
Re: ComboBoxCellEditor flickering [message #1185873 is a reply to message #1185867] Thu, 14 November 2013 10:20 Go to previous messageGo to next message
Artyom Karalov is currently offline Artyom Karalov
Messages: 15
Registered: August 2013
Location: Israel
Junior Member
Thanks for direction.
I will dig deeper and try to override it locally.
Re: ComboBoxCellEditor flickering [message #1200559 is a reply to message #1185873] Thu, 21 November 2013 09:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
Hi Artyom,

as the editing is the stuff I refactored a while ago, I have some passion that it works correctly. Smile

So I was also digging into this and tried to find out what's going on.

The reason is that the ComboBoxCellEditor is opening the dropdown immediatelly on activation. That behaviour is intended, but it causes the jumping, as the NatCombo is positioning the dropdown below the Text, and at the activation time the Text is not positioned correctly.

The only solution I found was to use a little listener trick in the ComboBoxCellEditor. I'm adding a ControlListener to the Text control of the NatCombo that opens the dropdown and unregisteres itself immediately after that. It is activated once the Text control is resized or moved.

As I was mostly not able to test it accordingly it would be great if you could test it and comment either in this topic or the ticket I created for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=422224

We moved our build to the new Nebula HIPP instance, so unfortunately there is no current SNAPSHOT build available. We hope to soon fix this. Till then it would be necessary to checkout the sources for testing.

Greez,
Dirk
Re: ComboBoxCellEditor flickering [message #1211826 is a reply to message #1200559] Tue, 26 November 2013 16:42 Go to previous messageGo to next message
S G is currently offline S G
Messages: 6
Registered: August 2013
Location: Germany
Junior Member
I could test it next week, I think. So I will give you a replay, afterwards.
Re: ComboBoxCellEditor flickering [message #1214044 is a reply to message #1211826] Wed, 27 November 2013 14:15 Go to previous messageGo to next message
S G is currently offline S G
Messages: 6
Registered: August 2013
Location: Germany
Junior Member
It works for me. Thx Dirk
Re: ComboBoxCellEditor flickering [message #1214054 is a reply to message #1214044] Wed, 27 November 2013 14:19 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1347
Registered: July 2012
Senior Member
Thanks for testing!
Previous Topic:Traverse in filter row with tab key
Next Topic:Info about applied Filter
Goto Forum:
  


Current Time: Thu Oct 30 12:35:34 GMT 2014

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

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