Board index » cppbuilder » TDateTimePicker in the Time format

TDateTimePicker in the Time format


2006-08-02 04:00:33 AM
cppbuilder58
Hello,
I am wondering if there is a way to prevent someone from going past certain points in a TDateTimePicker object. (For example I don't want the user to be able to go under 2am or over 10 pm) I was using the OnChange event to look at what time value they were at and if they are above or below the ranges that are allowed to put them to either the min or max range. The problem is you can get around this by manually typing the number or by keeping the button pushed which seems to prevent the OnChange event from occuring as its spinning through the time values.
Any ideas?
---Dave
 
 

Re:TDateTimePicker in the Time format

"ashlar" < XXXX@XXXXX.COM >wrote in message
Quote
I am wondering if there is a way to prevent someone from going
past certain points in a TDateTimePicker object. (For example
I don't want the user to be able to go under 2am or over 10 pm)
Try setting the ParseInput property to true and then use the OnUserInput
event.
Quote
The problem is you can get around this by manually typing the number
That is what the OnUserInput event is for.
Gambit
 

Re:TDateTimePicker in the Time format

Thanks Remy!
You rock!
"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote

"ashlar" < XXXX@XXXXX.COM >wrote in message
news:44cfb2e1$ XXXX@XXXXX.COM ...

>I am wondering if there is a way to prevent someone from going
>past certain points in a TDateTimePicker object. (For example
>I don't want the user to be able to go under 2am or over 10 pm)

Try setting the ParseInput property to true and then use the OnUserInput
event.

>The problem is you can get around this by manually typing the number

That is what the OnUserInput event is for.


Gambit


 

{smallsort}