Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edit cursor position in EDITBOX control in a Grid (VFP5)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00159968
Message ID:
00159975
Vues:
45
Hi Edward and John,

I had tried the AfterRowColChange method of modifying the SelStart
property, but that does not work either.

Any other suggestions ?

Edward, I am interested in your suggestion to use two Edit Boxes.
How would that work exactly ?

Thanks.
Michel.

================= Original message follows ======================

>>Hi All,
>>
>>I have an EDITBOX in one of the columns of a grid. SPARSE is set
>>FALSE.
>>
>>If the end-user scrolls a particular EDITBOX to read its contents, and
>>then clicks on the same EDITBOX in another row, that EDITBOX on the
>>new row positions its contents at the same character position as that of the EDITBOX the
>>end-user just left.
>>
>>To get rid of this unwanted effect I have put a
>>KEYBOARD "{CTRL+HOME}" in the LostFocus Event of the EDITBOX. This
>>works to a point in that if you go from one EDITBOX to the same
>>EDITBOX in another row but in the same column, the Ctrl+Home repositions
>>the cursor at the beginning of the new EditBox's contents.
>>
>>But it is not perfect. If you leave the EDITBOX and click on a
>>DIFFERENT row but not in the same column, then it still occurs : the
>>EDITBOX in the NEW ROW but in the SAME COLUMN as the column you just
>>left, repositions itself at the same character position as where you had left the
>>EDITBOX in the last row you were at (this could be
>>lines and lines after the first word!).
>>
>>Has anyone works something that gets round this ?
>>
>>Michel Creppy.
>
>You have Grid.Before/AfterRowColChange events to reliably discern between row and column changes. To move insertion point to needed position you may reset Editbox.SelStart property. Also, it seems to me that you may want to use two editboxes for each column (just to move pointer to start only in active row).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform