Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox with DateTime
Message
From
08/04/2003 07:40:44
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
08/04/2003 05:25:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00775018
Message ID:
00775031
Views:
14
Set the .InputMask of the TextBox to the required DateTime with a mask for the hours and minutes; eg.
.Format = "R"
.InputMask = LEFT(TTOC(DATETIME()), 11) + "99:99" + RIGHT(TTOC(DATETIME()),3)
The User will only be able to edit the hours and minutes.

The TextBox .Value will be a 4 digit number (hhss).

This should be easy enough to validate and "stuff" back into the source date.

You will have to deal with days or months that contain a "9" though :(

>I need use one TextBox with DateTime . End user only can change hours and minutes , he can´t change date and seconds .
>
>I know make this in valid .
>But it´s possible in InterActiveChangeevent ?
>If end user try modify date , i want nothing happens .
>
>I like when Textbox have focus , cursor is in hours . When TextBox win focus with enter or tab , i just use some Keyboard right arrow ,and cursor stay in hours .
>
>But , how can i make , when TextBox win focus with a click of mouse . I want cursor in hours .
Previous
Reply
Map
View

Click here to load this message in the networking platform