Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Laskey(): Ctrl+E and Down arrow values are the same !?
Message
De
15/10/1998 05:10:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/10/1998 15:31:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00146830
Message ID:
00147047
Vues:
27
>Cetin, I tried to dedect row change in grid beforerowcolchange using your code:
>
>llChangingRow = .f.
>with this
> if mdown()
> lnBottom = .top+.headerheight+ .relativerow * .rowheight
> lnTop = lnBottom - this.rowheight
> lnMouseRowPos = mrow(wontop(),3)
> llChangingRow = !between(lnMouseRowPos,lnTop, lnBottom)
> else
> llChangingRow = inlist(lastkey(),24,5,18,3,145)
>...
>
>lastkey() value 5 is used to dedect down arrow. However, value 5 is returned
>also when user presses Ctrl+E key.
>
>I strongly do not wish to execute row change logic when Ctrl+E key is pressed.
>In my program, ctrl+e causes beforerowcolchange event to occur.
>How to avoid this?
>
>Also, 145 code is returned only by alt+down arrow. Why this value is
>included in inlist() ?
Andrus,
It's normal Ctrl+E and uparrow have same values. Ctrl+E,X,S,D would give arrow movements, Ctrl+M enter, Ctrl+[ Esc, Ctrl+H backspace, Ctrl+i Tab etc. I think this due to old times where you should do this movements with ctrl keys on a terminal emulation. In form.keypress you could intercept it so you may want to move code there (with form.keypreview = .t.).
145 is for Ctrl+DnArrow and in my class is used for adding a new record. When pasting the code I only pasted that part and missed my extra key was there too.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform