Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pressing enter in checkbox....
Message
De
28/10/1997 10:45:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00056691
Message ID:
00056999
Vues:
43
>if nKeycode=13 >nodefault >this.LostFocus >endif > >This worked for not toggling the checkbox state >however the control didn't lose focus. If I set >the focus to the next control it works fine. It would >be nice to have a more universal method of setting >focus to the next control. Maybe keyboard {TAB}... > >Gary Now I'm having this situation for enth time - the supposed method for a control passing focus to the next control in the TabIndex order is not to .lostFocus the current control, but to .setFocus to the next control, and there's no .nextControl property (at least not in the base control classes). My form class has an array of relative indexes into form.controls, ordered by TabIndex (only for controls which have TabStop=.t.), so I have a way to know which control is the next. Though, in the days of FPD, a simple _curobj=_curobj+1 would have done the trick. Hey, it said "_curobj - index of the current OBJECT" :). So FPD, which had Foundation Read and Read Modal and other obsolete contraptions, did have array of objects, lined up in the order their gets were issued, and in VFP, which is fully OOP and BlahBlah and what not, your object must know the next object's name (who said encapsulation and independence of objects?). Just like the FPD days - if you don't know how to do something from a program, simulate it via Keyb command. If someone answers one's own message, it's called recursion; if my program has to talk to itself via Keyb, that's solipsism. So, FoxWish: any object in the form should have .NextControl and ..PrevControl properties. Votes?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform