Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on Combo
Message
De
09/06/2006 04:32:13
 
 
À
09/06/2006 04:22:02
Chandan Chakraborty
Bangiya Gramin Vikash Bank
Raiganj, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01120105
Message ID:
01128060
Vues:
31
Chandan,
When you need to represent a limited number of choices to the user you could use OptionGroup instead of ComboBox, of course here the main word is LIMITED :o)
In your case, you set focus to two different controls here, also you could use DO CASE instead of several IFs, also if you want to change focus when user change something put this code in InterActiveChange Event of the COmbo, but that way the user can't use Arrows in DropDown portion of the Combo. Try this in InterActiveChange (and after that you could move it to LostFocus event:
DO CASE
   CASE thisform.Combo1.Value = [TO CASH]
        STORE .t. TO thisform.mchno.enabled,;
                    thisform.mdr.enabled
        thisform.mchno.setfocus()
   CASE thisform.Combo1.Value = [BY CASH]
        thisform.mCr.enabled=.t.
        thisform.mcr.setfocus()
ENDCASE
>Thanks for the help. But I am facing the following problem.
>
> I have created a combo and added fields by combo bulider. Choosed drop down list. In th click event I have wrote:
>
>

>if thisform.combo1.value="TO CASH"
>thisform.mchno.enabled=.t.
>thisform.mdr.enabled=.t.
>endif
>thisform.mchno.setfocus
>
>IF thisform.combo1.value="BY CASH"
>thisform.mCr.enabled=.t.
>endif
>
>thisform.mcr.setfocus
>
><\pre>
>Now, if I choose "To Cash" by useing upper key or "T" or "B" the focus is not firing. But when I am doing same by mouse it is fine.
>How I can get the same result when I use keyboard to find the field? Actually I want that both the system will in force.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform