Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox's drop down list problem.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00773314
Message ID:
00773536
Vues:
10
>>I have a combobox who's dropdown list shows up as empty when it shouldn't.
>>In the DropDown() method I have something like this:
>>
>>lnQResult = REQUERY(viewname)
>>
>>IF lnQResult <> 1
>> Wait Window ('Requery problem')
>>ELSE
>> This.Requery()
>> wait window ('Made it this far')
>> This.Refresh()
>> If This.ListCount = 0
>> Wait Window ('empty list')
>> EndIF
>>EndIf
>>
>>I get the problem with this sequence of actions:
>>
>>1. Users clicks the down arrow - the view has a bunch of records, the user selects one.
>>2. User takes focus off the combobox, then goes back to the combobox and clicks the down arrow.
>>3. This time, there is only 1 record in the view, so that is what they select.
>>4. User takes focus off the combobox, then goes back to the combobox and clicks the down arrow.
>>5. This time the view has a bunch of records, but the list shows up empty! Plus the listcount is NOT equal to zero!!
>>6. If they click the down arrow a second time, it works.
>>
>>I can repeat this 100% of the time. Does ANYONE have ANY idea on a work around for this? I've tried it with VFP7 and 8...same problem.
>>
>>Thanks!
>
>Victor,
>
>I have seen this type of behaviour with the combobox, listbox and grid when it related to a cursor / table. The cause, I believe, is the record pointer the control believes it should be on, no longer exist and it appears blank. I have set the pointer to the first record, refreshed the control, requeried, then refreshed the control again to get this behaviour to stop.
>
>HTH,

hmmmmm...well I tried that and still seem to have the same behavoir, I still have to hit the down arrow 2 times. Maybe I can put the code that's in the downarrow in a new method and just run it two times??
I've had problems like this in the past and actualy ended up putting a textbox on top of the combobox to get it to do what I wanted. It just seems insane to do something like that though.
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform