Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change the Textbox in a Grid Control
Message
 
À
18/07/2002 13:28:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00680069
Message ID:
00680079
Vues:
30
This message has been marked as the solution to the initial question of the thread.
>Hello !
>
>I need to change the text box in my grid at run-time using code...
>I'm using this lines and the grid looks fine, but when I click in a column that had its textbox replaced, the textbox loses its value... TAB key doesn't set the focus to it and no edit is permited...
>What's wrong?
>Here are the lines:
>
> This.grid.Column1.RemoveObject('Text1')
> This.grid.Column1.AddObject('Text1','MeuText')
> This.grid.Column1.currentControl = "Text1"
> This.grid.Column1.ControlSource = "mytable.myfield"

Juliano, you need to add a line

This.grid.Column1.Text1.Visible = .t.

By default the added object has .Visible = .f.

As Help states:

When you use AddObject to add an object to a container, the object’s Visible property is set to false (.F.) so you can set the properties of the object without any awkward visual effects as the object’s appearance changes.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform