Atozed Forums
TIWCalendar in modal window - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: TIWCalendar in modal window (/thread-2494.html)

Pages: 1 2


RE: TIWCalendar in modal window - JuergenS - 09-16-2021

Hi Alexandre, thanks a lot for your help.


The TIWCalendar component now also works in a modal window with a TFrame.


However, I also noticed the following small problems:

If the properties CaptionNext or CaptionPrevious are changed by localized texts during runtime, this only takes effect for both fields after at least one of the fields has been clicked.

The digits in the date fields are always displayed with an underscore, although this is not selected in the properties. This cannot be changed either.

When you click on a number in the calendar, the font color changes to display the selection (red), but only as long as the mouse button is pressed.
A permanent switchover is only possible if you only release the mouse button outside of the number field!

The CheckerBoard property cannot be switched off programmatically.

Since I haven't found any further documentation for TIWCalendar, I also have the following questions:

Can the property LocaleID be generated via the Microsoft API macro MAKELCID ?
What does this property do ?
So far, I have been loading localized resources from a Microsoft resource file, first switching the LocaleID of the TFrame accordingly (SetThreadUILanguage()/SetThreadLocale()).

What is the FrameBuffer property used for ?


Regards
Juergen


RE: TIWCalendar in modal window - JuergenS - 10-10-2021

After upgrading from IW15.2.38 to IW15.2.39, the buttons for previous / next no longer work correctly.
Only one completely blank page is displayed at a time.
If I go back to IW15.2.38 it works again.


Regards
Juergen


RE: TIWCalendar in modal window - Alexandre Machado - 10-13-2021

Previous / Next buttons where? You mean the browser history buttons?


RE: TIWCalendar in modal window - JuergenS - 10-13-2021

No, I mean the Previous / Next buttons from TIWCalendar.
So it also happens in the example I sent you.


RE: TIWCalendar in modal window - Alexandre Machado - 10-15-2021

Oh... I see.. I'll check it out and get back to you.

Thanks


RE: TIWCalendar in modal window - Alexandre Machado - 10-18-2021

This issue has been fixed and will be available in the next update


RE: TIWCalendar in modal window - JuergenS - 10-18-2021

Thanks


RE: TIWCalendar in modal window - JuergenS - 10-19-2021

Ok, is working again.


RE: TIWCalendar in modal window - joergb - 12-13-2023

Sorry for entering the old thread...

but I have just the problem. IWCalendar in a Modal window. Clicking Prev or next in Calendar the modal Window is cleared and nothing else happen

IW 15.5.3
CBuilder 10.2.3
IWCalendar.AsyncMode is true

ModalWindowParameters:
  IWMdlWCal->Reset();
  IWMdlWCal->Autosize  = false;
  IWMdlWCal->HasFooter = false;
  IWMdlWCal->HasHeader = false;
  IWMdlWCal->SizeUnit = suPixel; 
  IWMdlWCal->ContentElement = IWCalendar1; 
  IWMdlWCal->Buttons->Add("Übernehmen|NoClose");
  IWMdlWCal->Buttons->Add("Schliessen");
  IWMdlWCal->WindowHeight= 250;
  IWMdlWCal->WindowWidth = 300;
  IWMdlWCal->Show();   


Thanks
  Jörg


RE: TIWCalendar in modal window - joergb - 12-13-2023

No idea why it doesn't work.
I tried an older IntraWeb version (15.4.1), but had the same behavior.
Maybe it's my old cbuilder ? 10.2.3.

Now I found a solution or got around the error:
in IWCalendar I set AsyncMode to false
write an event routine for DateChange and one for GetMonthName or GetDayName
The events are also fired from the Modal Window.
When a date is selected TDateChange, and when Prev or Next Button is clicked GetMonthName.

The ModaleWindow is closed, I can't prevent that, but I start it again in the GetMonthname event routine.

The previous/next month is displayed, it is as it should be.
In Germany we say "from behind through the chest into the eye" [Image: wink.png]

But it seems to work if anyone is still looking for it.
Or is there something against it?

Thanks
  Jörg