Print Page | Close Window

CXTDateTimeCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9704
Printed Date: 15 November 2024 at 10:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTDateTimeCtrl
Posted By: adrien
Subject: CXTDateTimeCtrl
Date Posted: 25 February 2008 at 7:58pm
Hi all
 
I'm struggling with what should be the simple task of using CXTDateTimeCtrl to edit a duration (delay) value.  I want to be able to edit delays from 0s to 1day in HH:MM:SS format, but the format specifiers for the control don't even have SS option, and it seems to use GMT -> local time conversion so I'm getting garbage.
 
Is there an easier way?



Replies:
Posted By: Oleg
Date Posted: 26 February 2008 at 12:40am
hi,
 
use SetFormat method. See DTM_SETFORMAT in MSDN


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: adrien
Date Posted: 26 February 2008 at 1:28am
yep, I read that.
 
Problem is CTime offsets everything to a GMT time, so my numbers are starting with my timezone, i.e. I enter 60 (being seconds), and I get back 01:01:00 in the control.  I set the range from CTime(0) to CTime(24*60*60), but the actual range goes from 1am to 11am only.
 
What would be great would be a dedicated CDurationCtrl.
 
I looked at Mask edit as well, but it's not suited to time values, since all numerics are 0-9, which is no good for minutes, seconds etc.
 
Maybe should extend the mask edit format specifier to allow sub-ranges, i.e. instead of mask of 00:00:00, you could have
 
02d[0-24]:02d[0-59]:02d[0-59]
 
or some regex expression for validation.  Otherwise I guess it's time to handle control feedback messages and do my own input validation.


Posted By: rsvihalek
Date Posted: 21 August 2009 at 9:36am
Hello everybody,
I need to edit duration (= delay) too, is there any simple way to do that with the XTremeToolkit Pro?

Thank you for the reply


Posted By: rsvihalek
Date Posted: 21 August 2009 at 12:22pm
So I've found solution, the time has to be set using SYSTEMTIME structure - it is working properly for delay values without any conversion



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net