Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tabbing out of a 'class'
Message
De
03/02/2017 10:17:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/02/2017 09:29:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01647416
Message ID:
01647422
Vues:
83
>Greetings all...
>
>I noticed for the first time today that you can TAB out of a class... I have a simple class that pops up and gives users a couple of choices. TAB goes between the objects in the class, which in this case are two combo boxes, and a command button to make the class invisible, and to pass the focus to the next input field in the form.
>
>I had expected that TABing repeatedly would cycle thru the objects in the class, but it doesn't work that way. TABing the third time in the class takes the focus to an object in the form beneath the class.
>
>How do I get the class to retain the 'focus' until the command button it clicked?
>
>Many thanks!

Your command button code click could be like:
* do whatever 

this.parent.Visible = .F.
keyboard '{TAB}'
and have this code in your container class' LostFocus code:
If this.Visible
	NoDefault
	this.firstControl.SetFocus()  && set focus to first control whatever is that
endif
However, note that this wouldn't only allow TAB to cycle within the container class containers but would set focus to first control if the user say use mouse to get to another control on the form (IOW either keyboard or mouse container retains the focus).
Ç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