Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure to start INIT Event
Message
 
 
À
29/10/2006 16:48:57
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01165385
Message ID:
01165387
Vues:
13
Your question is a bit unclear. Can you change your grid in design time?

>Hello comunity
>
>I work with an accounting program where i can deploy on them, because they have a framework and selecting for example Invoice Form "SFT" the program give me default options Events, adding, editing,delete..
>But in this invoice form , i have a Grid and i have created a textbox visible on them.
>I have a problem because when i open my form , on my Grid i don´t see this new field because i don´t have the Event INIT property enable for the Grid Object .
>Well , i don´t know if making some code into my actual program i can make available this Event "INIT" for my Grid Object to make appear after open my Form SFO my grid show me this new column fied.
>my program is :
>
>if SFO.adding
>SFO.Pageframe1.Page1.Cont1.Grid1.init
>* if the column that was not added then add to Grid:
>if type("SFO.Pageframe1.Page1.Cont1.Grid1.luis") = "U"
>messagebox('entrei','directa')
>
>* Create the new column on Grid
>SFO.Pageframe1.Page1.Cont1.Grid1.AddObject("luis", "cgecoluna")
>
>
>* That is an editing column
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.readonly = .f.
>
>* Títle of my column
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.header1.caption = "Luis"
>
>* fontsize on header
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.header1.fontsize = 8
>
>* fontsize write on them by the user
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.fontsize=8
>
>* Position on Grid for my new column
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.columnorder = 3
>
>* Alignement of my column
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.header1.alignment = 2
>
>* Control source fo my field
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.controlsource = "fn.u_contini"
>
>* Code to changed textbox to Combobox
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.addobject("MyTxtBox", "nossocombobox")
>
>* Visible=.T.
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.mytxtbox.visible = .t.
>
>* Enabled=.T.
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.mytxtbox.enabled = .t.
>
>* is not Readonly
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.mytxtbox.readonly = .f.
>
>* A caixa de texto é um objecto da coluna que foi acrescentada
>SFO.Pageframe1.Page1.Cont1.Grid1.luis.CurrentControl = "MyTxtBox"
>
>endif
>endif
>
>return .t.
>
>I hope my question was not to confuse.
>
>Many Thanks
>Luis Santos
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform