Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:23 Go to next message
Jens Rabe is currently offline Jens RabeFriend
Messages: 81
Registered: September 2013
Member
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 16:23 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 428
Registered: July 2009
Senior Member

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 08:08 Go to previous messageGo to next message
Jens Rabe is currently offline Jens RabeFriend
Messages: 81
Registered: September 2013
Member
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 154 times)
  • Attachment: cdt02.png
    (Size: 1.04KB, Downloaded 155 times)

[Updated on: Tue, 16 May 2017 08:09]

Report message to a moderator

Re: CDateTime shows analog clock regardless of CLOCK_DISCRETE setting [message #1763491 is a reply to message #1763440] Tue, 16 May 2017 16:42 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 428
Registered: July 2009
Senior Member

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 10:55 Go to previous message
Jens Rabe is currently offline Jens RabeFriend
Messages: 81
Registered: September 2013
Member
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: Wed Sep 19 06:00:04 GMT 2018

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

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

Back to the top