709 views
in GUI Development by
Hi, I am trying to understand how the DatePicker and TimePicker templates work, specifically how the properties Day, Month and Year (or Hour, Minute and Second) are updated with the selected date or time.  I can see that there is a property called "OnChange" of type slot, which receives a postsignal from the onEndSlide slot method. The comment nedt to the 'postsignal' instruction reads "// Notify the owner of the date picker, that the user has selected another date." (for the date picker).

But where is the code which actually updates the values of Day, Month and Year with the user selected values?

1 Answer

0 votes
by

Hello Jonathan,

the properties Day, Month, etc. don't store any values in memory. As such they are not updated. Instead the properties implement the OnGet methods. They implement code to 'return' the correct value according to the selection made in the scroll list. For example, the OnGetHour method in Time Picker implementes following code:

Each time your application queries the value of the property Hour, the code is execututed returning the value coresponding to the scroll list position.

Does it help you further?

Best regards

Paul Banach

by
Hello Paul,

Thank you for your reply - it helps me very much!  I understand much better now...

Best regards,

Jonathan

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...