Skip to main content



      Home
Home » Eclipse Projects » NatTable » Closing combo box dropdowns when leaving NatTable editor
Closing combo box dropdowns when leaving NatTable editor [message #1844091] Tue, 31 August 2021 23:39 Go to next message
Eclipse UserFriend
Hello,

In our applications we have NatTables embedded in Editor parts.

If a combo box dropdown editor is opened, and then a different editor is selected, the new editor is open but the dropdown control is still visible over the new editor.

I have partially fixed the problem by adding to the NatCombo's Shell Listener a call to combo.hideDropDownControl() in the method shellDeactivated.

However, what I would rather do is close the ComboBoxCellEditor on shellDeactivated, as on return to the original Editor the cell editor is still open, which leads to the cell not showing the value of the cell, but a text cell editor with the cursor flashing, when we just do hideDropDownControl.

When I try to close the ComboBoxCellEditor on shellDeactivated, when clicking to a new editor the ComboBoxCellEditor is closed, but the new editor is not opened, or even stranger, sometimes our entire application is minimized in the OS.

I thought the problem was in the call to super.close() in AbstractCellEditor, where it calls forceFocus on its parent. However, I tried implementing my own close method where it simply removes the EditorControlListeners and disposes of the EditorControl, but the issue is still there.

Do you have any idea what could be going on?

Thanks,

Louis
Re: Closing combo box dropdowns when leaving NatTable editor [message #1844092 is a reply to message #1844091] Wed, 01 September 2021 00:35 Go to previous messageGo to next message
Eclipse UserFriend
My first question is, how do you select the other editor? Is this done by a click on the other cell? Or do you switch via tab?

In the current version of NatTable and our examples I at least can't reproduce the issue. There are many listeners in place (FocusListener, TraversalListener) that should automatically close an open editor if it looses the focus or another editor is opened. But of course I might have missed a case or maybe you are working on Mac which actually behaves always different in some event handling mechanisms.

That said, to help you I need more information. From what I know and see, this should not happen with the latest NatTable version.
Re: Closing combo box dropdowns when leaving NatTable editor [message #1844116 is a reply to message #1844092] Wed, 01 September 2021 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Oh sorry, by Editor I meant an Eclipse editor. So in the attached image, the editor tab "Requirements Table Editor" has a NatTable in it, and a ComboBoxCellEditor was opened.

Then, I clicked on the tab NewAdvoCATEProject_Requirements.requirements to open a text editor, and the ComboBoxCellEditor is still visible in the text editor.
  • Attachment: ComboBox.png
    (Size: 12.59KB, Downloaded 88 times)
Re: Closing combo box dropdowns when leaving NatTable editor [message #1844125 is a reply to message #1844116] Wed, 01 September 2021 23:24 Go to previous message
Eclipse UserFriend
Ah ok, but still the combo should then close automatically because it looses the focus. At least it should.

Have you verified that the click on the tab causes a focus lost event? For scrollbars I remember that it didn't happen so I needed to add some special handling.
Previous Topic:coloring of nattable cells dynamically
Next Topic:Nattable added keybindings
Goto Forum:
  


Current Time: Thu May 22 19:48:57 EDT 2025

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

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

Back to the top