Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
A combo box would be much better.
Or an optiongroup?
**************************************************
*-- Class: txt_time (h:\vfp\gwa.vcx)
*-- ParentClass: container
*-- BaseClass: container
*-- Time Stamp: 08/16/04 09:17:12 AM
*
DEFINE CLASS txt_time AS container
Width = 92
Height = 28
BackStyle = 0
BorderWidth = 0
*-- Control Source for time field
cnt_source = "REQUIRED"
*-- Set to .T. if CNT_SOURCE is a DateTime field, otherwise Numeric is presumed.
ldatetime = .F.
*-- Set to .T. if CNT_SOURCE is a memory variable.
lismemvar = .F.
*-- Set to .T. if time is to be displayed in Military (24-Hour) format.
lmilitary = .F.
Name = "txt_time"
ADD OBJECT txt_hr AS textbox WITH ;
Alignment = 3, ;
Value = 12, ;
Height = 23, ;
InputMask = "99", ;
Left = 2, ;
Top = 3, ;
Width = 25, ;
Name = "txt_hr"
ADD OBJECT txt_min AS textbox WITH ;
Alignment = 3, ;
Value = 0, ;
Format = "L", ;
Height = 23, ;
InputMask = "99", ;
Left = 31, ;
ToolTipText = "Enter value between 0 and 59", ;
Top = 3, ;
Width = 25, ;
Name = "txt_min"
ADD OBJECT txt_ampm AS textbox WITH ;
Value = "AM", ;
Format = "M", ;
Height = 23, ;
InputMask = "AM,PM", ;
Left = 61, ;
ToolTipText = "Press A, P, or SPACEBAR to toggle between AM and PM", ;
Top = 3, ;
Width = 26, ;
Name = "txt_ampm"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 12, ;
BackStyle = 0, ;
Caption = ":", ;
Height = 22, ;
Left = 26, ;
Top = 3, ;
Width = 8, ;
Name = "Label1"
PROCEDURE Init
this.txt_hr.ToolTipText = "Enter value between 1 and " + IIF(this.lmilitary,"24","12")
ENDPROC
PROCEDURE txt_hr.Valid
IF this.Value < 1 OR this.Value > (IIF(this.Parent.lmilitary,24,12))
RETURN .F.
ENDIF
ENDPROC
PROCEDURE txt_min.Valid
IF this.Value < 0 OR this.Value > 59
RETURN .F.
ENDIF
ENDPROC
ENDDEFINE
*
*-- EndDefine: txt_time
**************************************************