DateTimeCtrl 1.06 released [message #4553] |
Tue, 15 August 2006 10:47  |
|
Hi!
I developed new version of datetime ctrl. Please use it and report any bug. This version brings two importnat features: Scalability with system font size and calendar as a separate control:

Sources: http://dgs.pac.pl/dgs.php?page=downloads
Changelog:
- fixed crash introduced in 1.05
* DateTimePopUp class renamed to Calendar
+ calendar scales properly with used font's size
+ calendar can be now used as a separate control
+ highlighting if header date is pointed
* SetSize() method removed
* SetBorderSize() method removed
* Select All days is now default
* calendar use colors appropriate to selected gui theme
* other various fixes and improvements
PS: Mirek it seems that tips on popup windows stopped to work again..
PS2: h3l1 - I also included your translations
-
Attachment: dt_1.06.png
(Size: 31.54KB, Downloaded 4066 times)
|
|
|
|
|
|
Re: DateTimeCtrl 1.06 released [message #4580 is a reply to message #4579] |
Tue, 15 August 2006 22:37   |
|
Yes you're right. I just used method appropriate for europe (I think so, I'm not an expert in this topic...).
The only problem is to find proper algorithms for method:
WeekOfYear(int day, int month, int year)
if you know them please mail them to me.
I will also add ability to choose what day of week is first monday or sunday - in one of next versions..
|
|
|
|
|
|
Re: DateTimeCtrl 1.06 released [message #4615 is a reply to message #4614] |
Wed, 16 August 2006 22:42   |
|
Werner wrote on Wed, 16 August 2006 15:48 |
The following link is not exactly what I was looking for - it's C# ...
Anyway I could imagine that it might prove quite useful :
http://www.codeproject.com/cs/miscctrl/MonthCalendar.asp
As soon as I find something in C or C++ I'll let you know.
|
Thanks! Unfortunately this calendar calculates week number using ISO8601 method which is already implemented in datetimectrl...
PS: Do we really need another method of week calculation??
|
|
|
Re: DateTimeCtrl 1.06 released [message #4638 is a reply to message #4615] |
Thu, 17 August 2006 18:24   |
Werner
Messages: 234 Registered: May 2006 Location: Cologne / Germany
|
Experienced Member |
|
|
Quote: | Thanks! Unfortunately this calendar calculates week number using ISO8601 method which is already implemented in datetimectrl...
PS: Do we really need another method of week calculation??
|
I strongly believe so!
Please refer to http://en.wikipedia.org/wiki/Week "Week number". You can read there that at least the US uses a system different from ISO 8601. I can't imagine that a library which doesn't consider US customs will be successful - be this desirable or not.
And even more compelling: http://www.merlyn.demon.co.uk/weekinfo.htm. I only now learned that there are UK and US tax weeks. While writing an application to calculate taxes may not be the everyday job of an ordinary programmer, this is definitely a typical computer task. Providing a flexible week-of-the-year feature would be a nice unique "selling" point of Ultimate++.
Or am I too demanding?
Werner
[Updated on: Thu, 17 August 2006 21:35] Report message to a moderator
|
|
|
|
Re: DateTimeCtrl 1.06 released [message #4643 is a reply to message #4638] |
Thu, 17 August 2006 18:58   |
|
Quote: | Or am I to demanding?
|
Of course not. It's an easy task - just need to find algorithm. I always been week in dates calculations - that's why I'm looking for solution out of box.
|
|
|
Re: DateTimeCtrl 1.06 released [message #4910 is a reply to message #4553] |
Thu, 24 August 2006 22:29   |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
I compiled your DateTimeCtrl package and it works fine after removing reference on String in line 473 in DateTimeCtrl.cpp. I compiled with version 608.r21.
By the way, I had to change the image file location #define and the layout file location #define from relative to absolute spec, because they could not be found. Is this normal or does this effect only exist due to the fact that I have the DateTimeCtrl package in a totally different directory tree as the upp sources?
Matthias
931b81e7ea53320dccc37375b34b38c3
|
|
|
Re: DateTimeCtrl 1.06 released [message #4912 is a reply to message #4910] |
Thu, 24 August 2006 23:35   |
|
masu wrote on Thu, 24 August 2006 16:29 | I compiled your DateTimeCtrl package and it works fine after removing reference on String in line 473 in DateTimeCtrl.cpp. I compiled with version 608.r21.
By the way, I had to change the image file location #define and the layout file location #define from relative to absolute spec, because they could not be found. Is this normal or does this effect only exist due to the fact that I have the DateTimeCtrl package in a totally different directory tree as the upp sources?
Matthias
|
I'm sorry for any trouble. Yesterday I did many fixes due to gcc and linux compatibility (including that ones you're describing). When I also add ability to choose first day of week I will release 1.07
|
|
|
|
|
Re: DateTimeCtrl 1.06 released [message #5412 is a reply to message #5411] |
Wed, 20 September 2006 08:35   |
|
zsolt wrote on Tue, 19 September 2006 18:51 | I have found a small bug. In ReadOnly mode, user can click on drop button, dropping the calendar.
I added a line to void DateTimeCtrl::OnDrop() method as first line:
if(!IsEditable()) return;
Now it works perfectly. Btw thanks for this good work 
|
Thanks! Your fix will be added to the next version 1.07.
|
|
|
Re: DateTimeCtrl 1.06 released [message #6275 is a reply to message #5412] |
Sun, 05 November 2006 14:51   |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
found a small "bug"
when clicking on today but you are in another month or year the calendar won't change to todays month and year:
changed Calendar::LeftDown(Point p, dword keyfile)
[...]
if(aspopup) {
[...]
} else {
[...]
RefreshDay(prevday);
if(istoday)
SetDate(dt); //this line was changed
else if()
[...]
}
Bas
[Updated on: Sun, 05 November 2006 14:52] Report message to a moderator
|
|
|
|
Re: DateTimeCtrl 1.06 released [message #6295 is a reply to message #6277] |
Sun, 05 November 2006 23:02   |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
you are welcome,
another "bug" when compiling with 610-dev4:
since 610-dev3 the function "IsXpStyle()" is gone, so the following line in
DateTimeCtrl.icpp should be changed:
void Calendar::PopUp(Ctrl *owner, Rect &rt) {
Close();
Reset();
SetRect(rt);
//Ctrl::PopUp(owner,true,true,IsXpStyle()); I am old!
Ctrl::PopUp(owner);
open=true;
}
Bas
[Updated on: Sun, 05 November 2006 23:02] Report message to a moderator
|
|
|