Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » CalendarCtrl » DateTimeCtrl 1.06 released
Re: DateTimeCtrl 1.06 released [message #6297 is a reply to message #6295] Sun, 05 November 2006 23:27 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

fallingdutch wrote on Sun, 05 November 2006 17:02

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

Thanks again, but this is already fixed. DateTime will be integrated with upp so in future such bugs will be fixed immediately. Sorry for troubles...

Re: DateTimeCtrl 1.06 released [message #6298 is a reply to message #6297] Sun, 05 November 2006 23:58 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 696
Registered: December 2005
Location: Budapest, Hungary
Contributor
This would be better, I think:
void Calendar::PopUp(Ctrl *owner, Rect &rt)
{
	Close();
	Reset();
	
	SetRect(rt);
	//Ctrl::PopUp(owner, true, true, IsXPStyle());
	Ctrl::PopUp(owner, true, true, GUI_GlobalStyle() >= GUISTYLE_XP);
	open = true;
}
Re: DateTimeCtrl 1.06 released [message #6299 is a reply to message #6298] Mon, 06 November 2006 00:14 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

zsolt wrote on Sun, 05 November 2006 17:58

This would be better, I think:
void Calendar::PopUp(Ctrl *owner, Rect &rt)
{
	Close();
	Reset();
	
	SetRect(rt);
	//Ctrl::PopUp(owner, true, true, IsXPStyle());
	Ctrl::PopUp(owner, true, true, GUI_GlobalStyle() >= GUISTYLE_XP);
	open = true;
}


And this's exactely how it's really fixed Wink
Re: DateTimeCtrl 1.06 released [message #6340 is a reply to message #6299] Tue, 07 November 2006 11:52 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
just found another two things:

1. in DateTimeCtrl.cpp you define your IMAGEFILE local, that doesn't work for me, but "#define IMAGEFILE <DateTimeCtrl/DateTimeCtrl.iml>" does work

2. in Paint i get an Error on the line
String &s = DyName((i+1)%7);

it works with
String s = DyName((i+1)%7);


Bas
Re: DateTimeCtrl 1.06 released [message #6342 is a reply to message #6340] Tue, 07 November 2006 11:59 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

fallingdutch wrote on Tue, 07 November 2006 05:52

just found another two things:

1. in DateTimeCtrl.cpp you define your IMAGEFILE local, that doesn't work for me, but "#define IMAGEFILE <DateTimeCtrl/DateTimeCtrl.iml>" does work

2. in Paint i get an Error on the line
String &s = DyName((i+1)%7);

it works with
String s = DyName((i+1)%7);


Bas


Thanks! But I think I have this all already fixed (I did it when testing it under linux and using gcc).
Re: DateTimeCtrl 1.06 released [message #6575 is a reply to message #6342] Sun, 19 November 2006 14:04 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
a callback when the selected day changed would be nice, so you can react on it by getting the current date and run some other code with the new date.

Bas

[Updated on: Sun, 19 November 2006 14:06]

Report message to a moderator

Re: DateTimeCtrl 1.06 released [message #6581 is a reply to message #6575] Sun, 19 November 2006 15:57 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

fallingdutch wrote on Sun, 19 November 2006 08:04

a callback when the selected day changed would be nice, so you can react on it by getting the current date and run some other code with the new date.

Bas


I think WhenAction is all you need...

datectrl <<= THISBACK(WhenDateChanges);
or

datectrl.WhenAction = THISBACK(WhenDateChanges);
Re: DateTimeCtrl 1.06 released [message #6584 is a reply to message #6581] Sun, 19 November 2006 16:48 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
with a little change, yes:

i am only using Calendar, not DateTimeCtrl.

so I Added Action() to the else part of if(aspopup) in LeftDown(Point p, dword flags) after the three lines updating the current day, month and year.

void Calendar::LeftDown(Point p, dword flags) {
   [...]
   if(aspopup) {
      [...]
   } else {
      cday = dt.day;
      cmonth = dt.month;
      cyear = dt.year;

      Action();

      [...]
   }
}


Bas
Re: DateTimeCtrl 1.06 released [message #6585 is a reply to message #6584] Sun, 19 November 2006 17:07 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes, you're right, I thought you meant datetimectrl not the calendar.
I think there should be WhenAction() instead of your own callback Action.
Re: DateTimeCtrl 1.06 released [message #6586 is a reply to message #6585] Sun, 19 November 2006 17:45 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Action() calls the WhenAction callback

Bas
Re: DateTimeCtrl 1.06 released [message #6587 is a reply to message #6586] Sun, 19 November 2006 18:12 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

fallingdutch wrote on Sun, 19 November 2006 11:45

Action() calls the WhenAction callback
Bas

There is always something to learn about upp Wink
Previous Topic: [EXISTS] DateTimeCtrl
Next Topic: DateTimeCtrl in new versions U++
Goto Forum:
  


Current Time: Fri Apr 19 03:25:54 CEST 2024

Total time taken to generate the page: 0.03287 seconds