Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Add Valid Procedure to Dynamic Grid procedure.
Message
From
02/08/2002 18:35:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00685749
Message ID:
00685753
Views:
17
>I want to add a "Valid" procedure/method to Column1 in the following simplified dynamic grid code. I do not understand the syntax to add such a procedure at this level.
>
>Suggestions will be greatly appreciated.
>
>Thanks
>
>====================================================
>frmMyForm = CREATEOBJECT('Form') && Create a Form
>
>
>frmMyForm.Width = (_Screen.Width/10)*8
>frmMyForm.Height = (_Screen.Height/10)*8
>
>
>
>frmMyForm.SHOW
>
>
>local llFirstRun, llNotLockedHere
> m.llNotLockedHere = frmMyForm.LockScreen
> m.llFirstRun = .T.
>
>
> if PEMSTATUS(frmMyForm, 'LOB', 5)
> m.llFirstRun = .F.
> frmMyForm.LockScreen = .T.
> frmMyForm.LOB.Visible = .F.
> frmMyForm.RemoveObject('LOB')
> endif
>
>frmMyForm.AddObject('LOB','myGrid')
>
>with frmMyForm.LOB
> .Top = 10
> .Left = 02
> .Width = frmMyForm.Width/2
> .Height = frmMyForm.Height/2
>
> .RecordSource = "LOB"
> .ColumnCount = 12
> .RowHeight = 25
> .FontSize = 8
>
> .Column1.ControlSource = (.RecordSource+'.LBCOMPANY')
> .Column1.Width = 25
> .Column1.Header1.Caption = 'CO#'
> .Column1.Alignment = 3
>
>
> .Visible = .T.
>
>endwith
>
>
>
>if !m.llFirstRun
> frmMyForm.LockScreen = m.llNotLockedHere
>endif
>
>
>READ EVENTS && Start event processing
with .Column1
 .AddObject('myText','myText')
 .CurrentControl = 'myText'
 .myText.visible = .t.
 .Sparse = .f. && not mandatory
endwith

* ...

define class myText as TextBox
procedure Valid
*my valid code
endproc
enddefine
However I never suggest to use valid in grid.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform