Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding an Event for a TextBox in a Grid Programmatically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00696764
Message ID:
00696817
Vues:
14
Michael,

You need to add a textbox subclass that already has that DblClick() method.
with TheGrid.TheColumn
   .RemoveObject( "text1" )
   .AddObject( "text1", "MyTextboxSubclass" )
endwith

define MyTextbox as Textbox
function DblClick()
... do something interesting here
endfunc
enddefine
You also should not use FormName to reference controls, you are not guaranteed that the memvar will always be that. Use one of nameless references like this, this.parent, thisform instead.

>I have a grid on a form that I am having to set the properties for on the fly.
>
>Is there a way to pass the double click event programmatically.
>
>I have tried the following syntax:
>
>FormName.PageFrame.PageNumber.GridName.ColumnName.TextBoxName.DblClick = 'ThisForm.DisplayName'
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform