Skip to main content



      Home
Home » Eclipse Projects » Nebula » CDateTime used as cellEditor
CDateTime used as cellEditor [message #63026] Wed, 15 April 2009 23:33 Go to next message
Eclipse UserFriend
Originally posted by: NOSPAMachan.progress.com

Hi,

I'm using CDateTime as a table cellEditor. It worked well in terms of
letting me "spin" the date/time and calendar etc. However, since it is a
celleditor, I would expect the editing to be done when user hit enter/esc.
I used to have the swt's DateTime control, which let me add keyListener so I
can handle the keyRelease events.

However, if a field (e.g. hour/year etc) is highlighted inside the CDateTime
control, all key events were delivered to the widget and my key listener
doesn't get the keyRelease call back and hence, I can't commit the date/time
changes.

Any idea how to do it? Has anyone tried using CDateTime as a table cell
editor?

Thanks.

-aston
Re: CDateTime used as cellEditor [message #63027 is a reply to message #63026] Wed, 15 April 2009 23:54 Go to previous message
Eclipse UserFriend
Originally posted by: NOSPAMachan.progress.com

Right after I posted this message, I found a way to handle this.

If I addTraverseListener(), then the reverseEvent will contain the keyCode,
which I can use to check for CR and ESC.

I'm all set...


"Aston Chan" <NOSPAMachan@progress.com> wrote in message
news:gs68tk$2s6$1@build.eclipse.org...
> Hi,
>
> I'm using CDateTime as a table cellEditor. It worked well in terms of
> letting me "spin" the date/time and calendar etc. However, since it is a
> celleditor, I would expect the editing to be done when user hit enter/esc.
> I used to have the swt's DateTime control, which let me add keyListener so
> I can handle the keyRelease events.
>
> However, if a field (e.g. hour/year etc) is highlighted inside the
> CDateTime control, all key events were delivered to the widget and my key
> listener doesn't get the keyRelease call back and hence, I can't commit
> the date/time changes.
>
> Any idea how to do it? Has anyone tried using CDateTime as a table cell
> editor?
>
> Thanks.
>
> -aston
>
Re: CDateTime used as cellEditor [message #594478 is a reply to message #63026] Wed, 15 April 2009 23:54 Go to previous message
Eclipse UserFriend
Right after I posted this message, I found a way to handle this.

If I addTraverseListener(), then the reverseEvent will contain the keyCode,
which I can use to check for CR and ESC.

I'm all set...


"Aston Chan" <NOSPAMachan@progress.com> wrote in message
news:gs68tk$2s6$1@build.eclipse.org...
> Hi,
>
> I'm using CDateTime as a table cellEditor. It worked well in terms of
> letting me "spin" the date/time and calendar etc. However, since it is a
> celleditor, I would expect the editing to be done when user hit enter/esc.
> I used to have the swt's DateTime control, which let me add keyListener so
> I can handle the keyRelease events.
>
> However, if a field (e.g. hour/year etc) is highlighted inside the
> CDateTime control, all key events were delivered to the widget and my key
> listener doesn't get the keyRelease call back and hence, I can't commit
> the date/time changes.
>
> Any idea how to do it? Has anyone tried using CDateTime as a table cell
> editor?
>
> Thanks.
>
> -aston
>
Previous Topic:CDateTime used as cellEditor
Next Topic:gantt chart : display size
Goto Forum:
  


Current Time: Tue Jul 08 13:09:35 EDT 2025

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

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

Back to the top