Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to drag a control to/from a grid?
Message
From
07/12/2006 12:31:16
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175606
Message ID:
01175761
Views:
8
>>>>Thanks Terry - I will give that a try. I'm trying to learn about all the quirks in VFP 9, as relates to combos in grids. So first I want to get a combo working perfectly outside a grid, then move it to a column in my grid. Then compare how the combo works - inside vs outside the grid... So far, even with VFP 9, I cannot get the combo's dropdown list to remain open (when combo is in a grid).
>>>
>>>KEYBOARD '{F4}' PLAIN
>>>
>>>in the combo's SgotFocus() event
>>>
>>>will cause it to open auto when you focus on it
>>>
>>>>It closes as soon as I type any character. OTOH, outside of a grid, the combo stays dropped down as I type characters - performing incremental searches (as one would expect it to).
>>>
>>>You sure you've got the combo' Style prop. set as a drop-down list or combo? If you want to be able to type in it then set it to 0.
>>>
>>>FYI, I don't know if you know but "combo" stands for "Combination text box-drop-down list" (not surf & turf), for use when, say, you have a list of name titles, e.g. Mr, Mrs, Miss, Ms, and you want to enter something unusual, like "Capt", "Rev" or "WCom" (Wing Commander).
>>
>>
>>Yes, I have it's style set to 0 - Dropdown, yet the list closes upon typing anything. Not that I have its style set to List mode, but are you saying the dropdown list is designed to close as soon as you type anything (when style = List)?
>
>So isn't that expected behaviour for a drop-down list?

I'd have to review how a normal (non-grid) combo control that has its style set to 1- List works. Perhaps the auto-close behavior makes sense in that case?

>>
>>I also have observed that when combo is in a grid, the first time I click on the combo's dropdown arrow, the list drops down for a brief instant, then closes. I have to click on it a 2nd time, and then the dropdown remains open. Until I type anything, at which point it closes. So I have 2 quirks occurring so far with combos inside a grid...
>
>Did you put the code I mentioned, above, in its .GotFocus()? Not sure but I guess the first click is "swallowed" by the grid. Don't know why the combo jitters though. You'd need to set a breakpoint in the grid's .GotFocus() and trace what's hap[pening.


No, I did not try adding that code yet. I do notice that ***every other*** time I click on the combo's arrow, the dropdown list flashes for only a second, then disappears. If I click on it again, it remains open. So I do not think it has anything to do with the grid stealing focus away from combo (as the grid is already selected).

I think I am going to start a brand new project and test grid-based combos more thoroughly. Maybe that fact that this project was created by the VFP 6 "converter" (from a FP-DOS 2.6 project) is making my life very difficult :)




>>
>>In my case the grid's column is a PartNumber field from a Products table. The combo is set up as 2 columns, PartNumber and PartDescription. I want the user to be able to type in the part number (if they know it), OR drop down a list of PartNumber/Description choices to pick from. I want the dropdown to incrementally search as they type. Am I asking for to much from this native combo control?
>
>And is it NOT actually incrementally searching as you type, even though the list closes? Does it get there when you put a valid part no. in?

When I type the first character, it does incrementally search and move to the first matching item in the dropdown - but then immediately closes. I want it to stay open until I press ENTER or click on a choice.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform