Hi All,
I am happy because TDateTimePicker have an internal CheckBox. But completely don't understand why Checked works as Enabled. For me Checked=Selected. Only me have this problem?
Gabor

Mailing lists / lazarus / 2015-11
7 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi All,
I am happy because TDateTimePicker have an internal CheckBox. But completely don't understand why Checked works as Enabled. For me Checked=Selected. Only me have this problem?
Gabor
Gabor Boros wroteI am happy because TDateTimePicker have an internal CheckBox. But completely don't understand why Checked works as Enabled.
Me neither. How does Delphi behave? It has to be changed if it is not due to compatibility with Delphi.
For me Checked=Selected.
No. Selected is yet another property. Checked, Selected, Enabled - all three are independent properties.
Ondrej
2015.11.20. 13:21 keltez?ssel, Ondrej Pokorny ?rta:
Delphi compatibility not important for me but examined with 2010. Checked gray out the text only. Arrow button is accessible. If click on arrow Checked set to True without selection which is wrong from my POV.
Sorry. Mistyped. Checked=selected. I want to use Checked for parameterizing a query and not for disable the DateTimePicker. If I want to disable set Enabled to False.
Found an other problem. If set state of Checked at runtime in DateTimePicker1.Checked:=True form eg. in a TButton.OnClick DateTimePicker stole the focus.
Gabor
Feel free to provide patches. Don't forget to check different WidgetSets (Win32, Qt, Gtk2, Carbon at least). I'll review them.
Some "strange" behavior may be caused by the fact that some features are not supported on all WS and therefore it's better to keep the same "strange" behavior everywhere then to have different behavior across WS. This may be the case of a checkbox in TDateTimePicker. Also check the bug tracker, maybe the bugs have already been reported.
If the same "correct" behavior cannot be achieved in all WS, there is still a valid workaround - place an extra checkbox in front of the TDateTimePicker. (AFAIR I did the same in Delphi long time ago because I had problems with the checked property as well. I don't remember any details, though.)
Ondrej
2015.11.20. 15:01 keltez?ssel, Ondrej Pokorny ?rta:
Feel free to provide patches. Don't forget to check different WidgetSets (Win32, Qt, Gtk2, Carbon at least). I'll review them.
Can you review a patch which assigned to an another developer? I not see any traffic from Jesus in these weeks.
http://bugs.freepascal.org/view.php?id=28931
I use the external checkbox trick with Delphi also.
Gabor
I think so! I'll check it in the weekend.
Ondrej
2015.11.20. 16:33 keltez?ssel, Ondrej Pokorny ?rta:
I think so! I'll check it in the weekend.
Thank you!
Gabor