Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid column data alignment
Message
De
02/02/2016 17:45:13
 
 
À
02/02/2016 13:03:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01630432
Message ID:
01630616
Vues:
115
run this code and read the message.refer also to foxhelp.
Publi yform
yform=Newobject("asup")
yform.Show
Read Events
Retu

Define Class asup As Form
    Top = 13
    Left = 32
    Height = 286
    Width = 603
    Caption = "Form1"
    Name = "Form1"

    Add Object grid1 As Grid With ;
       recordsource="ycurs", ;
        Anchor = 15, ;
        Height = 265, ;
        Left = 12, ;
        Top = 12, ;
        Width = 577, ;
        Name = "Grid1"

    Procedure Load
        Set Date Long
        Create Cursor ycurs (xdate D,num i)
        For i=1 To 10
            Insert Into ycurs Values (Date()-i,i*2546)
        Endfor
        Locate
    Endproc

    Procedure Init
        With This.grid1
            .RecordSource="ycurs"
            .column1.Width=150
            .column1.Alignment=2
            .column2.Width=100
            .column2.Alignment=2
            .Refresh
        Endwith
    Endproc

    Procedure Activate
        Local M.MYVAR
        TEXT TO M.MYVAR NOSHOW
 For a TextBox control in a column, the column's Alignment setting determines alignment
 of text in the text box.See foxHelp/Alignment Property chapter!
 0   Left. Aligns text flush left.
 1   Right. Aligns text flush right.
 2   Center. Aligns text in the horizontally and vertically centered on the control.
 3   Automatic. (Default)

        ENDTEXT
        Messagebox(m.MYVAR,0+32+4096,'Text alignment in grid')
    Endproc

    Procedure Destroy
        Clea Events
    Endproc

Enddefine
*
*-- EndDefine:asup
Regards
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform