Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange combobox problem
Message
From
18/02/2004 14:57:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Strange combobox problem
Miscellaneous
Thread ID:
00878465
Message ID:
00878465
Views:
56
I am experiencing strange combobox behaviour. I have three comboboxes to present choices on a form. Each of the three has two fields in the form, created in an SQL statement which is the RowSource. The statements differ slightly but are all similar to: SELECT ALLTRIM( FIRSTFIELD ) + " " + ALLTRIM( SECONDFIELD ) AS DISPLAYFIELD, CODEFIELD FROM SOURCETABLE INTO CURSOR CURTEMPSOURCE ORDER BY DISPLAYFIELD. The second column is bound to a field in another table, and to make these strictly look-up (user is not allowed to add/change these values from this form), the style is set to drop-down list.

Here's the wierd part: two of these comboboxes work fine, but the third does not. For the two that do, click on the control, it drops down with. Move mouse down, highlight moves down within the frame and you can use the scroll bars to see more. Click on a highlighted value, the list closes and the control is updated.

For the other, click on the control, the list drops down with the first (current) value highlighted. Move the mouse down, the highlight does _not_ move. Click on a non-highlighted value, you see the highlight move briefly to the value clicked on, the list closes, the control is _not_ updated. Click on the control again, click on the scroll bar, highlight now moves with the mouse but clicking on the highlighted value still does not _update_ the control.

I have tried deleting and recreating the combobox. I have tried creating a new form with just a combobox with the same properties and get the same problem. To make things worse, I have an older version where the combobox will update the control, but exhibits the same scrolling behaviour.

I have to think this is somehow related to the data, but I can't for the life of me see what it could be. I can browse the cursor generated by the SELECT statement, and it works fine and is ordered properly. Thinking it could be the staggered length of the data generated by the ALLTRIMs in the SELECT, I tried using LEFT to generate all equal width values for that field. I also reindexed the SOURCETABLE but didn't think that would work because the SELECT seems to be OK.

I hope someone has some ideas, and TIA.

Duncan Ruxton
Remove the obvious for mail
dmruxton@spam_me_not.myrealbox.com
Next
Reply
Map
View

Click here to load this message in the networking platform