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.
Clear
@ 4,2 Class myCombo Name myCombo
Read
Clear
Define Class myCombo As ComboBox
Procedure Init
This.RowSource = "1,2,3,4,5"
This.RowSourceType = 1
Endproc
Enddefine
Clear
@ 4,2 Class myText Name myText
Read
Clear
Define Class myText As Textbox
Procedure Valid
if empty(this.value)
messagebox("this value cannaot be empty!")
endif
Endproc
Enddefine
FUNCTION riAct( p_Win )
* ReadIt Activate Function
LOCAL lnI, oCont, aWins, nWins, lnWin, llLck, lnTxtHig
DIMENSION aWins[10]
nWins = Split( @aWins, p_Win, ',' )
lnTxtHig = 0 && v10.00 wgcs
for lnWin = 1 to nWins
if type(aWins[lnWin])='O' && If there IS a form object...
loForm = eval(aWins[lnWin])
if type('loForm.PageFrame1')='O'
with loForm.PageFrame1
llLck = loForm.LockScreen
.SetAll('FontName', 'Arial', 'TextBox')
.SetAll('FontSize', _Screen.FontSize-2, 'TextBox')
.SetAll('Margin', 0, 'TextBox')
.setall('fontbold', .f., 'Textbox')
.SetAll('FontName', 'Arial', 'CheckBox')
.SetAll('Backcolor', loForm.BackColor, 'Label')
loForm.LockScreen = .T.
FOR lnI = 1 to .Pages[.PageCount].ControlCount
oCont = .Pages[.PageCount].Controls[lnI]
with oCont
do case
case upper(.Class)='COMMANDGROUP'
* Most common case we care about
for ctrCtrl2 = 1 to .ButtonCount
oCtrl2 = .Buttons[ctrCtrl2]
if _Screen.FontSize >= 15
oCtrl2.FontSize = INT( MIN(40,max(5,_Screen.FontSize * 3/4)) )
endif
oCtrl2.FontName = 'Arial'
oCtrl2.FontBold = .F.
endfor
oCtrl2 = .null.
case upper(.Class)='COMMANDBUTTON'
if _Screen.FontSize >= 15
.FontSize = INT( MIN(72,max(5,_Screen.FontSize * 3/4)) )
endif
.FontName = 'Arial'
.FontBold = .F.
otherwise
if type('oCont.BorderStyle')='N'
oCont.BorderStyle = 1
endif
if type('oCont.SpecialEffect')='N'
oCont.SpecialEffect = 0
if type('oCont.FontSize')='N' ;
and oCont.FontSize = loForm.FontSize ;
and oCont.FontSize > 4
oCont.FontSize = oCont.FontSize-1
endif
endif
if upper(.Class)='TEXTBOX'
lnTxtHig = .Height
endif
if upper(.Class)='COMBOBOX' and lnTxtHig>0
.Height = lnTxtHig
endif
if upper(.Class)='EDITBOX' and not 'DONE'$.Tag
.Tag = .Tag+' DONE'
.left = .Left-1
.Width = .Width+3
endif
endcase
endwith
ENDFOR
loForm.LockScreen = llLck
ENDWITH
endif
endif
endfor
RETURN .T.