Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make .Selected listbox item visible?
Message
De
11/07/1997 11:35:38
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00039346
Message ID:
00039481
Vues:
36
>>>>>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.
>
>No luck. I even tried removing the LockScreen's completely. This is sort of a leap, but I'm using VFP 5.0. Do you have 5.0a? You're help is greatly appreciated...Any other thoughts on this problem?

I tested it for 3b and it worked fine.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform