On Sat, 12 Aug 2006 00:41:21 +0200
bouquinique <[EMAIL PROTECTED]> wrote:
>
>
> Mattias Gaertner a écrit :
> > On Sat, 12 Aug 2006 00:01:32 +0200
> > Fedorax <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Hello
> >>
> >> The following code work with Tbuttons, Tedit, Tdbedit, Tdbgrids, etc but
> >> never works with a Tlistbox.
> >> What's wrong here ?
> >>
> >> Thank's
> >>
> >> If Self.ActiveControl.ClassType=TListBox then Begin
> >>
> >> ShowMessage
> >> (FindComponent((components[ActiveControl.ComponentIndex]).Name).Name);
> >>
> >
> > the above is equivalent to
> >
> > if (ActiveControl=nil) or (ActiveControl.Name='') then
> > AccessViolation
> > else
> > ShowMessage(ActiveControl.Name);
> >
> > Has the TListBox a Name?
> >
> > Mattias
> >
> Yes, TlistBox has a name but when i execute the code i get the
> name of the precedent component used, not name of TListBox.
Check that TListBox.Owner=Self and there is no 'with' statement.
> Another thing, the OnENter event off listbox don't work.
Please create a bug report with a description/example. This way it is not
forgotten.
> I've replace TListBox with ComboBox and all works perfectly.
ok
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives