micbasov Posted November 19, 2011 Posted November 19, 2011 Hi Farhad! I made a test case to test the component UniDBLookupComboBox. Correct set of the properties Text only occurs during the second CloseUp event. procedure TMainForm.UniDBLookupComboBox1CloseUp (Sender: TObject); var LField, Text: String; begin LField: = UniDBLookupComboBox2.ListField; Text: = UniDBLookupComboBox2.ListSource.DataSet.FieldByName (LField). AsString; UniDBLookupComboBox2.Text: = Text; / / NOT WORK!!! UniGui 0.87.0.904 DBLookup.zipend;
Administrators Farshad Mohajeri Posted November 19, 2011 Administrators Posted November 19, 2011 Hi Farhad! I made a test case to test the component UniDBLookupComboBox. Correct set of the properties Text only occurs during the second CloseUp event. procedure TMainForm.UniDBLookupComboBox1CloseUp (Sender: TObject); var LField, Text: String; begin LField: = UniDBLookupComboBox2.ListField; Text: = UniDBLookupComboBox2.ListSource.DataSet.FieldByName (LField). AsString; UniDBLookupComboBox2.Text: = Text; / / NOT WORK!!! UniGui 0.87.0.904 DBLookup.zipend; Actually, UniDBLookupComboBox Text property can not be assigned. I must be a readonly property. It will be published as readonly in next build. Same is correct for Delphi's default Lookup Controls.
Administrators Farshad Mohajeri Posted November 19, 2011 Administrators Posted November 19, 2011 You must use KeyValue instead. However I noticed that it doesn't work in same way. I will investigate.
micbasov Posted November 19, 2011 Author Posted November 19, 2011 You must use KeyValue instead. However I noticed that it doesn't work in same way. I will investigate. Thank you! We look forward to solving the problem.
Recommended Posts