Skip to main content



      Home
Home » Eclipse Projects » Nebula » CDateTime shows analog clock regardless of CLOCK_DISCRETE setting
CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763418] Mon, 15 May 2017 10:23 Go to next message
Eclipse UserFriend
I am using the CDateTime from Nebula to present the user a date/time selector. This is how I invoke it:

        _startDateTime =
                new CDateTime(composite, CDT.BORDER | CDT.TAB_FIELDS | CDT.CLOCK_24_HOUR | CDT.CLOCK_DISCRETE | CDT.DROP_DOWN | CDT.DATE_MEDIUM | CDT.TIME_MEDIUM);


Although I specified CDT_DISCRETE, the analog clock is shown when the drop down is clicked. How can I have the digital clock shown?
Re: CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763422 is a reply to message #1763418] Mon, 15 May 2017 12:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jens,

Try this.

Cheers,

Wim

		final CDateTime cdt = new CDateTime(shell, CDT.BORDER | CDT.COMPACT | CDT.SIMPLE | CDT.CLOCK_DISCRETE);
		cdt.setPattern("HH:mm:ss");
Re: CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763440 is a reply to message #1763422] Tue, 16 May 2017 04:08 Go to previous messageGo to next message
Eclipse UserFriend
This makes it look like this:
index.php/fa/29353/0/

But I want it to look like:
index.php/fa/29354/0/

and when I click the dropdown button at the right, a calendar and a discrete clock has to appear. However, a calendar and an analog clock appears.
  • Attachment: cdt01.png
    (Size: 2.88KB, Downloaded 509 times)
  • Attachment: cdt02.png
    (Size: 1.04KB, Downloaded 496 times)

[Updated on: Tue, 16 May 2017 04:09] by Moderator

Re: CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763491 is a reply to message #1763440] Tue, 16 May 2017 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

A discrete clock and a calendar side by side is not possible AFAIK.

Cheers,

Wim
final CDateTime cdt = new CDateTime(shell, CDT.BORDER | CDT.DROP_DOWN | CDT.COMPACT
| CDT.CLOCK_DISCRETE);
cdt.setPattern("HH:mm:ss");
Re: CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763551 is a reply to message #1763491] Wed, 17 May 2017 06:55 Go to previous message
Eclipse UserFriend
Since this seems to be the case (I tried a lot of different flags combinations and neither worked), I ditched CDateTime altogether and am now using two classic DateTime controls in conjunction with the DateAndTimeObservable. This doesn't show me the calendar, but at least it is possible to halfway comfortably edit date and time.
Previous Topic:Problems running Fortran code
Next Topic:NatTable (and other nebula widgets) in a maven repo?
Goto Forum:
  


Current Time: Fri May 02 07:07:05 EDT 2025

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

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

Back to the top