Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listboxes

Status
Not open for further replies.

michaelkatz

Programmer
Sep 1, 2002
50
GB
What is the best way to poulate a listbox and avoid items appearing twice when using the scrollbars. Also, the last item cannot be displayed without using the down arrow or the bottom scrollbar arrow.

Thank You

Mkatzla@juno.com
 
How many items are you putting in the list?

I would guess way too many.

Also what version of VFP and Service pack are you running?
 
I am using vfp 7.0 SP1

The list box has about twenty (20) items.
 
Sorry can't help you on that I have never seen either of those behaviours in a recent version of VFP.
 
michael,
I've only seen this when there was an errant LockScreen property been set/reset, or when there was a "bad" video driver in use.

Rick
 
Michael,

Are you saying that, when you scroll rapidly, some of the items appear twice in the list? That was bug that was fixed a very long time ago. You shouldn't be seeing with VFP 7.0 SP1. I'd be inclined to agree with Rick that it is a video driver issue.

Mike


Mike Lewis
Edinburgh, Scotland
 
This problem was brought to my attention by a user of my application on a different machine abot fifty miles away. They sent me the files and it is happening on my machine too. So. it is probably not a bad video driver.

The speed of the scroll makes no difference.

If I move the scroll bar all the way down, the last item in the list does not appear. Then if I move the scroll bar back up, the first item appears in the list twice.

I'm still working on it. If I figure it out, I'll inform all you kind helpers immediately

Thanks to all.
 
Michael,
What's the RowSourceType? (The RowSource too if appropriate.) How many columns and what are their type(s)?
Obviously, we need more info to help to determine if this is a "real" problem. What OS are they running (and you)? Any special form handling?

Rick
 
Rick,

The rowsourcetype is 6 - Fields
The rowsource is "Alias.FieldName,FieldName"

There are 2 columns. Both fields used to fill the listbox are Character Fields.

I am running XP home Edition. There is no special Form handling. The listbox is on a pageframe.

Michael
 
Michael,
Well we're narrowing things down. Is the Alias a table, cursor or view? Is it using a SET FILTER? Is it ORDERED by an index? Does the form use a Private dtasession? About how many records are in this Alias / Listbox?

Rick
 
Rick,
The alias is a free table.
It is unfiltered.
It is indexed on the field that shows up in the first column.
The form does not use a private data session.
There are 23 record in the table/listbox.

Thanks for any help.
Michael
 
Michael,
Well I guess I've still got questions (I wasn't at MY compter on Saturday). Do you have IntegralHeight set to .T.? Do you have a ControlSource set? Is it a variable, a form property or another table's field?

Rick
 
Rick,
IntegralHeight is .T. I set it to .F. and it did NOT solve anything.

ControlSource is "None"

I did create a new form and copied the listbox control to it and it works fine using the same table, so its obviously not a bad property setting.

It must be something in the code, that sizes the controls, changes colors, etc.

When I figure it out, I'll let you know. In the meantime, feel free to help. I appreciate your input

Thank You,
Michael
 
Rick,

I believe I found the cause. I seem to have a problem if the table is indexed. If I turn the index off it works fine.

Any idea why ?

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top