×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Drop Down Boxes... is there a limit to the number of items...

Drop Down Boxes... is there a limit to the number of items...

Drop Down Boxes... is there a limit to the number of items...

(OP)
I have an app (it's VFP6 based, and I'm not in a position to move it to VFP9 at the moment) that imports a list of customers from Sage accounts.

This list is then used with a drop down box to assign the Sage account reference to the customer in the application (the user who adds customers to Sage is not the same as the one who adds them to the app, so we cross reference them when needs be).

Today, for the first time with an app that - as you can guess - is more than a decade old, the drop down box is only showing the first few entries. The others are there, if the user types the whole Sage reference code, the drop down 'adopts' that entry and 'some' of those around it.

I think the drop down has come to some kind of limit - the rowsourcetype is 6. Fields and there are 'only' 168 entries in the table... has anyone come across this?

The problem seems to be a bit machine specific, my laptop does not exhibit the same problem with the same data.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Drop Down Boxes... is there a limit to the number of items...

Griff,

I recall setting SYS(2910) to a low-ish number once because some users were asking for fewer items to appear in the drop-down portion of a combo box (the other items were still there, but you had to scroll to see them). However, I have a feeling that this was not availablein VFP 6. Perhaps you could check?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Drop Down Boxes... is there a limit to the number of items...

On second thought, I think SYS(2910) might refer to things like auto-complete textboxes (which were definitely not avaialbe in 6). So that might be a false lead.

The combo box has a DisplayCount property that determines how many items are displayed in the drop-down portion. Does that help at all?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Drop Down Boxes... is there a limit to the number of items...

(OP)
Hi Mike

I have changed the system somewhat, to use a pop-up list of Sage References within a grid, with a quick search option.
Same drop down with over 2000 entries works fine on my laptop, so had to dream something up pronto.
Turns out the system is now nearly 20 years old, not so much 10!

Not sure what was going on locally - perhaps it was an anti-virus thing (blame them for most 'unknowns' these days).

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Drop Down Boxes... is there a limit to the number of items...

The list should have a scrollbar. Visible items are fewer, but there is no practical limit to the listitems.

When used for autocomplete or incremental search as VFP calls that within a grid/combo/listbox, it works out OK, but with many customers, I'd go for a real autocomplete textbox instead, because then your incremental search can be seen and you may also program it in the way items are found in VS editor as instring-matches, too. Meaning with an autocomplete textbox you can use the default of "starts with" search, but you can override that if you like.

You don't just have the Autocomplete=4 (Custom) setting, which allows a custom weight for how items are sorted and presented for picking from them, you may use the InteractiveChange event to update the weight for all autocomplete table records, even in the case of a few thousand it's not getting sluggish.

It's advisable to prepare the data for such more intelligent choices, for example, separate customer names in first and last and search "begins with" for both last and first name. Give weight to recently picked, give a weight to context, ie customers more frequently related to a currently picked project/product/category/whatever, so have multiple autocomplete tables at hand and use one that's fitting for the situation of the form.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Drop Down Boxes... is there a limit to the number of items...

(OP)
Customers PC had no scroll bar and only displayed the first six or so entries... the cursor would not move down below the sixth.
Same data and .exe on my laptop displayed scroll bar and all entries.

If customer type an entry that existed, it appeared, in the list, along with some of those around it!, still no scrollbar.

Weird.

Popup with grid works fine.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Drop Down Boxes... is there a limit to the number of items...

That IS weird, indeed.

Are we really talking about the combobox? Or some ActiveX dropdown list?

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Drop Down Boxes... is there a limit to the number of items...

(OP)
Native combobox...

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Drop Down Boxes... is there a limit to the number of items...

Yes, it does look weird. I don't recall seeing this particular behaviour before.

I've seen cases where a combo or listbox with more than a couple of hundred entries became so slow as to be unusable, but that only applied in the very early versions of VFP. I'm pretty sure it was fixed in 6. And in any case, it doesn't explain the exact behaviour you are seeing.

If you have a grid with quick search working, that's fine. I won't suggest you change that. But, in general, I agree with Olaf that a textbox with auto-complete enabled has several advantages. It is easier to implement than a combo box or grid; you can fix it so that the user's most recent entries or most frequent entries appear first; and the user can see all the matching entries - and only the matching entries - as they type.

One disadvantage of this approach is that there is no guarantee that the items presented in the drop-down correspond to records that actually exist. For example, if you search for a customer, then delete that customer, then search for the same customer again, the customer's name will continue to appear even though it no longer exists. I've had users complain about that. You can get round it by maintaining your own autocomp table, although that involves a little extra work.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Drop Down Boxes... is there a limit to the number of items...

I can only think it could be a FILTER effect, but you'd also have that with the grid, ie only see the customers in the current filter.

If the grid solves it to you, I wouldn't worry too much about it, as the grid also offers other possibilities - a better look of items, for example. The combo also allows multi-column layouts, but no coloring or other ways of highlighting.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Drop Down Boxes... is there a limit to the number of items...

(OP)
Gonna stick with the grid, customer has a fix in place - so she's happy!

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Drop Down Boxes... is there a limit to the number of items...

Any chance you have DisplayCount set to some large value for that combo. Your message tweaked a vague memory and I found that I wrote this in HackFox:

Quote:


DisplayCount isn't choosy enough about what values it accepts. It'll let you specify 0 or a negative number. In VFP 6, in that case, it ignores you and just displays seven items. In VFP 7, setting DisplayCount negative displays the number of items you've set for List Display Count.

More seriously, when you make DisplayCount big, the list doesn't even show up when you drop the combo open. On Tamar's system, things start getting weird once DisplayCount gets over 50 and, by 130, the list doesn't even show up or appears way above the form. In between, there are some other weird behaviors. The moral of the story is to choose reasonable values for DisplayCount.

RE: Drop Down Boxes... is there a limit to the number of items...

(OP)
I will need to drag out a back-up to look.
Seeing as I have zapped the original control.
But good idea Tamar

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close