Discussion:
[Lazarus] Why TDateTimePicker.Checked works as Enabled?
Gabor Boros
2015-11-20 11:26:56 UTC
Permalink
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
2015-11-20 13:48:02 UTC
Permalink
Post by Gabor Boros
I 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.
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.
Post by Gabor Boros
For me Checked=Selected.
No. Selected is yet another property. Checked, Selected, Enabled - all
three are independent properties.
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

--
Gabor Boros
2015-11-20 15:18:53 UTC
Permalink
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
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.)
I use the external checkbox trick with Delphi also.

Gabor

--
Gabor Boros
2015-11-20 15:45:53 UTC
Permalink
I think so! I'll check it in the weekend.
Thank you!

Gabor

--

Loading...