[Lazarus] scripting lazarus commands from external programs

David Emerson dle3ab at angelbase.com
Thu Mar 25 06:47:42 CET 2010


On Wednesday 24 March 2010 15:51, Michael Fuchs wrote:
> 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.

so if user types text it'll call OnChange() for each char like in TEdit ?
hm...I don't like it.
Does work this (cannot try at the moment) ?
i := ComboBox1.Items.Add('something');
ComboBox1.ItemIndex := i;
OnChange() should fire on itemindex change if I remember correctly.

zeljko




More information about the Lazarus mailing list