Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cbo Box Virtually Blank, But Not Really!
Message
 
To
02/12/1998 09:48:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00163184
Message ID:
00164044
Views:
26
Hi John,

Thanks for your help. Actually, I have gotten around this behavior -- even though it might be classified as a quick & dirty fix -- here's the code I put in cboPattern.GotFocus...
*.frmMoldProd.cboPattern.GotFocus

STORE " " TO mPattern
This.DisplayValue=" "
ThisForm.Refresh
>Hi Chuck ---
>
>It appears that you are using a Combobox with Style=0 (Drop-down combo) where what you really want is a drop-down list (Style=2). If you changed the style setting then the value would not be easily set blank.
>
>Also, in your cmdSave.Click() method, check to the DisplayValue as opposed to the Value property or controlsource's value to determine if it's showing as blank.
>
>Finally, if your save button is on a toolbar as opposed to the form, the controlsource may not be updated with the combobox.value due to the form never firing a lostfocus for the control when a toolbar control is clicked.
>
>
>
>
>>I have a Combo box, cboPattern, with the following Properites:
>>
>>RowSource = VPMMold.dbf (a table with Mold Pattern #'s and INDEXed by Mold Pattern#)
>>
>>ControlSource = mPattern (an mvar that eventually gets written to a daily mold production dbf file)
>>
>>In testing to see if it was bulletproof, I noticed something that seems strange:
>>
>>After entering a Mold Pattern# in the cbo, or selecting from the cbo DropDown List, you can go back into the cbo and delete all the text. Then what occurs is that VPMMold.dbf, the RowSource, GOes TOP (even though I didn't tell it to do so in any of my user procedures). Also, the cbo box is left blank (at least it appears that way to the user). When you attempt to click on the cmdSave which I have on the form, all the mvars are written to the mold production dbf file, even though the cbo box 'appears' to be blank. This is not the desired operation I wanted. In the cmdSave.Click, I check for the cbo being blank, and then cause the user to go back and fill it in. But in this case, even though it appears to be blank, it's not really blank. I'm in need of help and would appreciate it very much. Thanks, CWH.
Chuck Henry
Previous
Reply
Map
View

Click here to load this message in the networking platform