graFFiti


In VFP9: I have a Form, that has a Container, that holds a Listbox The Listbox has some items in it. Now, if you try to click on an Item, hold the mouse clicked and drag it up and down, the selected item does not change, it just blocks there. When you release the mouse and click on another item, you now have TWO selected items in the Listbox. That is not normal. A Listbox outside a container works just fine.
Has anyone been able to solve this Thanks.



Re: HUGE problem with the Container Control (?)

dni


Is property MultiSelect .T. What are selected for RowSource and RowSourceType





Re: HUGE problem with the Container Control (?)

Tamar E. Granor

In addition to dni's questions, how is MoverBars set

Tamar





Re: HUGE problem with the Container Control (?)

AndyKr

>>Has anyone been able to solve this Thanks.

This is not native behavior. I just tested this with VFP Base Classes and I do not see the behavior you describe. The listbox functions identically whether it is in a container, on a Page in a Pageframe or directly on the Form. Click and Drag does not select multiple items UNLESS the listbox's "MultiSelect" property is set to .T.

Since you only see this behavior in the container, I would guess that either the ListBox class in the container defines MultiSelect = .T., or some code somewhere is setting the property in this particular form.

In either case, the HUGE problem is somewhere in your code....






Re: HUGE problem with the Container Control (?)

graFFiti

No, actually there is no extra code that could disturb this.
I use Visual FoxPro version 09.00.0000.2412
This is what I do:
New -> Form
In the form I add a Container Control from the Form Controls toolbox
I open the Container for editing and I add in it a Listbox control from the Form Control toolbox
I open the Init event of the Listbox and I write in it several identical lines just like this one:
this.additem("Item")
Then I run the form(CTRL+E), and it's buggy: when I grab an item and move the mouse up and down, the listbox freezes... try it!
The same form, cut and pasted outside the container control, works fine
No properties were changed from default...multiselect=.F. , moverbars=.F. ...
This problem doesn't only appear on my machine
This is really a huge problem of VFP9...discourages using containers
I really wish there is an expert amongst you that can help with this. 10x




Re: HUGE problem with the Container Control (?)

AndyKr

I will ignore your crack about experts and merely remind you that those who seek help from volunteers usually do better not to insult people who try and help them!

Let me repeat. I tested this with VFP Base Classes and do NOT see the behavior you describe. I did exactly what you describe and have absolutely no problem

However, now that you have posted your VFP Version, I see that you are NOT running SP1 ( the VFP build number for SP1 is  09.00.0000.3504)

 I suggest that since you are NOT running SP1 you try downloading it and installing it. YOu can get it from here:

http://www.microsoft.com/downloads/details.aspx FamilyId=1C06E35D-10A2-4A05-84FC-495B3A73ECF7&displaylang=en

I don't specifically recall a bug in the listbox but the fact that I cannot reproduce the behavior even when I repeat your exact code suggests that this may be a fix.






Re: HUGE problem with the Container Control (?)

graFFiti

Ok thank you. This might help. No insult intended...just trying to get someone to answer thouroughly.




Re: HUGE problem with the Container Control (?)

AndyKr

>just trying to get someone to answer thouroughly

I can assure you that this forum is crammed with experts, for whom, if you could afford to engage them professionally you would have to pay serious money for the advice that you get for free here. Also, all the people who answer questions here are volunteers - no-one receives any remuneration or compensation for the hours that they spend answering questions from people. They do it for the good of the Community and no other reason.

Please remember that when you are posting comments in response to people who have given up their time on a Saturday afternoon to bother to read your post, investigate your problem and post a reply for you! Frustration is understood, petulant whining and complaining is not.