Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Problems using CDateTimeCellEditor
Problems using CDateTimeCellEditor [message #1387114] Tue, 24 June 2014 09:01 Go to next message
m k is currently offline m kFriend
Messages: 6
Registered: June 2013
Junior Member
hello all

i was in need of a cell editor for editing a date, and was happy to learn that there is a CDateTimeCellEditor in the nebula project.
i used it in my table and at first it seemd to work as expected, but then i realised that it only partially worked.
when the cell is in editing mode, the part of the editor that allows for standard keyboard editing of the date is active, but when i select the button for the actual date selection widget that opens in a new composite, cell editing is finished. so, while i can still select a date in the open date selection window, the selection is ignored. while it makes somewhat sense that the edit mode ends when the button is clicked (focus is lost), this is not the way this widget is supposed to work, so it's likely i am doing something wrong here.

so, if someone knows how this behavior is triggered / can be changed, please let me know.

thanks in advance

m_k
Re: Problems using CDateTimeCellEditor [message #1387561 is a reply to message #1387114] Wed, 25 June 2014 08:57 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Hi m_k,

Please file a bug against CDateTime and attach a snippet that contains your structure. If you have time and capabilities, you are also welcome to fix the problem. Let's discuss all this in the bug. Please reply to this thread with the link to the bug so that others can find it.

Best regards,

Wim
Re: Problems using CDateTimeCellEditor [message #1403724 is a reply to message #1387114] Fri, 25 July 2014 14:57 Go to previous message
Fajin Yuan is currently offline Fajin YuanFriend
Messages: 1
Registered: July 2014
Junior Member
Hi Wim,

I had temperarily fixed this by sub-classing in my code:

package org.opengda.lde.ui.cdatetime;

import org.eclipse.nebula.widgets.cdatetime.CDateTime;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;


public class CDateTimeCellEditor extends org.eclipse.nebula.jface.cdatetime.CDateTimeCellEditor {

public CDateTimeCellEditor(Composite parent) {
super(parent);
}
@Override
protected boolean dependsOnExternalFocusListener() {
return false;
}
@Override
protected Control createControl(Composite parent) {
final CDateTime cdt = (CDateTime) super.createControl(parent);
cdt.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
if (!cdt.isOpen()) {
fireApplyEditorValue();
deactivate();
}
}
});
return cdt;
}

}

Could you possible added it into the org.eclipse.nebula.jface.cdatetime.CDateTimeCellEditor ?

Thanks Fajin Yuan
Previous Topic:Nebula GridViewerTable Column alignment.
Next Topic:Strang error with Nebula grid
Goto Forum:
  


Current Time: Thu Mar 28 14:21:42 GMT 2024

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

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

Back to the top