CDateTime used as cellEditor [message #63026] |
Wed, 15 April 2009 23:33  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.04094 seconds