[Lazarus] TComboBox and OnChange
Michael Fuchs
freepascal at ypa-software.de
Wed Mar 24 15:51:29 CET 2010
Am 24.03.2010 15:33, schrieb dmitry boyarintsev:
> On Wed, Mar 24, 2010 at 4:42 PM, Michael Fuchs
> <freepascal at ypa-software.de> wrote:
>> I know that this behaviour is the same as in Delphi, but I think it is not
>> consistent. Is it possible to change this?
>
> Why the behavior is not consistent?
Because, if you try this with a TEdit, it works.
> Since your code has changed Text value you're aware of the change happened.
> So you can call the necessary change handling code, like:
>
> ComboBox1.Text:='something';
> ComboBox1Change(ComboBox1Text);
Yes, in my case I try to test the OnChange calling in a fpcunit test.
The user selects a item of the dropdown list or types in text, but the
test just change the .Text property.
regards
Michael
More information about the Lazarus
mailing list