sim wrote: >>>> It's not a bug. It's working exactly the way it should. You should >>>> either populate the Choices will all existing values first, or not bind to >>>> a list-based control in the first place. >>>> >>> A combo box *is* a hybrid text box/list control. I can see the point of >>> perhaps >>> making a property to control this behavior. >>> >> We're not talking about *new* values entered by the user. We're talking >> about existing values in the database, but not in the Choices for the >> control bound to it. >> >> It's simple enough to grab the distinct values for the column to >> populate Choices. For whatever reason, this is not what is being done in >> this case. >> > > I'll give you a real-life example. I am building a medical application. > 90% of the patients have one of three insurance providers the other 10% > can have 1 of 35. The doctor only wants the 3 big ones in the drop down > list and if there are any others he will type them in. A combobox is > perfect for this as it contains a drop down with the normal choices and > the ability to add any choice he wants. Now when I go to the record, I > would like the value that is in the database to show up in the text box, > whether or not it is in the list or not. Having an Other choice and then > a textbox to fill in the value is not an option in this case. > > The predefined values are 6 bytes, so they are slightly larger then a 4 > byte int. It also saves me from having another table with Other values, > so space is not really an issue. > > In other words we are talking about new values that the user adds, he > just wants to be able to see them after he adds them. > For this to work, the only things that need to be done is to add user as > a ValueMode option and to have it save the value on LostFocus when the > ValueMode is user.
Yes you would otherwise be using a textbox for free-form textual entry, so you want to populate the Choices with ["A", "B", "C"] but allow *any* textual entry. I agree that Dabo's dComboBox should support such usage out of the box, without raising 'string must be present in the choices'. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
