Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make .Selected listbox item visible?
Message
De
11/07/1997 10:27:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00039346
Message ID:
00039452
Vues:
29
>>>If I have a listbox that shows 10 records at a time and I issue something like mylistbox.Selected(24)=.T., how do I make the listbox show a range of records that includes 24? Refresh and Requery don't seem to accomplish anything.
>>
>>I just made quick test and mylistbox.Selected(24)=.T. itself moves list items to proper range automatically. I tested for RowSourceType=0 and RowSourceType=6. What sourse do you use?
>
>I am using RowSourceType=6. The listbox is on the second page of a 2 page pageframe. In Page2.Activate I have the code:
>
>THIS.mylistbox.SetFocus
>
>and in mylistbox.GotFocus I have the code:
>
>THISFORM.LockScreen=.T.
>mnrecno=RECNO()
>COUNT ALL WHILE RECNO()#mnrecno TO mnoffset
>THIS.Selected(mnoffset+1)=.T.
>THISFORM.LockScreen=.F.
>
>The right item is selected but the listbox does not move itself to the proper range. Is there something in my code that could be preventing this?

It's just a guess: can you issue THISFORM.LockScreen=.F. before THIS.Selected(mnoffset+1)=.T.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform