Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setfocus to the visible first column, not the defined 1s
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01154356
Message ID:
01154365
Views:
8
This works for me:
oForm = CREATEOBJECT([Form1])
oForm.Show(1)


**************************************************
*-- Form:            form1 (d:\all_zapl\test.scx)
*-- ParentClass:     form
*-- BaseClass:       form
*-- Time Stamp:      09/16/06 05:39:00 PM
*
DEFINE CLASS form1 AS form


    DoCreate = .T.
    Caption = "Form1"
    Name = "form1"


    ADD OBJECT grid1 AS grid WITH ;
        Height = 188, ;
        Left = 14, ;
        Top = 18, ;
        Width = 320, ;
        Name = "Grid1"


    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 215, ;
        Left = 27, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "Command1", ;
        Name = "Command1"


    PROCEDURE Load
        lcSQL = [CREATE CURSOR crsTest (Fld1 C(20)]
        FOR asd = 2 TO 20
            lcSQL = lcSQL + [, Fld]+TRANSFORM(asd)+ [ C(20)]
        NEXT
        lcSQL = lcSQL + [)]
        &lcSQL
    ENDPROC


    PROCEDURE command1.Click
        thisform.LockScreen = .t.
        ***THIS.PARENT.New()
        APPEND BLANK
        DO WHILE THISform.grid1.LeftColumn # 1
           THISform.grid1.DoScroll(4)
        ENDDO
        THISform.grid1.COLUMNS(1).SETFOCUS()
        thisform.LockScreen = .f.
    ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform