Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox and listindex
Message
De
04/01/2004 17:09:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Listbox and listindex
Divers
Thread ID:
00863734
Message ID:
00863734
Vues:
79
I have a form of many pages and each page has at least one listbox on it. All of the listboxes have a rowsourcetype of 6 - Fields and a variable is the control source. When the user presses pageUp and goes to the next page the listbox is at the top of the list, but when the user presses PageDwn and goes to the next page the listbox is at the bottom of the page (end of file). If the user exits the last control on the previous page and moves to the next page the listbox is at the bottom of the list. What is causing this? I have tried moving the record pointer to the top of the table in the page's setfocus to no avail and even setting the variable's value to 1. Any ideas? I would like the listboxes to always start out at the top of the list when the page first gets focus. Setting listindex = 1 doesn't seem to work either...

Strangely, if I set step on when entering the setfocus of the page after hitting pagedown (from the previous page) the listindex value is 1 and the selected row is the top of the listbox, but when I let it process on its own it jumps to the end of the listbox...

UPDATE: Putting this.controltop.listindex = 1 (the listboxe) in the page's setfocus works when the page is activated by exiting the last control on the previous page (i.e. pressing ENTER or TAB) but not when pagedown is pressed on the previous page and the page is activated that way.


Also, when the listbox does NOT have the focus I would like NONE of the rows to be highlited. Is there a way to turn that highlite off like there is in grids in VFP8?

TIA,
Tracy
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform