Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Same old problem again
Message
From
15/12/2005 11:32:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078218
Message ID:
01078316
Views:
32
>Ok, here is what we found with my colleague Ambrish, who is a great programmer:
>
>When I start my form, I have all controls (except for two date controls, it's another thread's topic) bound. In the form's init I have the following code:
>
>
>	if empty(m.tcBatch_Imports_pk)
>		.setall('controlsource','')		
>
>
>The reason I did it was the behavior of the combobox when its RowSource is an array. If the value of the combobox is empty and it's not in the list, it adds the blank line as the last item in the list. My manager noticed this and objected. Thus I unbound my controls in run-time and put lots of extra-logic to handle them properly.
>
>But now the editbox starts to show the behavior I noted. In other words, if the editbox was once bound and you try to programmatically set its controlsource to "", it now doesn't save the value. I would consider this behavior as a bug.
>
>Thanks for listening and your consolations/ condolenses are warmly accepted <g>

I didn't see such a behavior with comboboxes unless explicitly coded to do it. I don't understand why an unbound editbox 'save' its value.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform