Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid - data transfer
Message
 
À
13/07/2000 11:17:14
Tina Levensky
Siegfried, Crandall, Vos & Lewis, P.C.
Kalamazoo, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00388924
Message ID:
00391895
Vues:
10
>There, I got it finally - thank you. Now for minor enhancements to the grid.
>
>1) Can I control the position of the cursor? When user clicks on header to change sort order, can I move the position of the cursor to that column?

Sure you can. Add to Header.click():
this.parent.setFocus()

>2) I would like to activate the enter key. Now, if you click on the Exit button, it will transfer which row the cursor is currently on - kind of awkward. I would like to be able to press enter on the selected record and exit to the original form.

You can change it in the Ingrid textbox class KeyPress event. But for the time being do not touch the class code, just add this functionality right into KeyPress event of every Ingrid textbox instance in your grid.

* Keypress Event
LPARAMETERS nKeyCode, nShiftAltCtrl
DODEFAULT(nKeyCode, nShiftAltCtrl)
IF nKeyCode = 13 && Enter
*your_code_here && (maybe Thisform.Release() )
ENDIF

>3) How can I change the highlighting of the headings based on which row the sort is effective in?

Add to Header.Click() something like:

IF your_condition_here
this.backColor = RGB(255,0,0) && Red
ELSE
this.backColor = RGB(0,255,0) && Green
ENDIF

or you may use DO CASE statement.

>These are just minor issues, but I think it will be clearer to understand for the end user. Thanks again!!
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