[Gambas-user] Select an entry in a combo or list box by keypress - Is there a better way.
Benoit Minisini
gambas at ...1...
Sat Sep 13 17:44:10 CEST 2008
On samedi 13 septembre 2008, Kari Laine wrote:
> Hi,
>
> i am trying to understand this observer. I include a little project that I
> tested with.
>
> PUBLIC SUB Form_Open()
> 'ListBox1.Add("box1row1")
> 'ListBox1.Add("box1row2")
> 'ListBox1.Add("box1row3")
>
> if these lines are uncommented the observer ceases to work.
>
> I cannot get the focus to move so that LostFocus would be triggered.
>
> I tried to make observer to react on TextBox events without success.
>
> Heading to Gambas-ide to find example ....
>
> Best Regards
> Kari Laine
I finally succeeded in reading your attachment. You didn't do what I told Ian
Ropper. The class in your project must be named "ListBox", and be exported,
so that you overrides the default ListBox class. You are exporting a form of
your project, which is useless.
I suggest you read the document on the wiki about the Gambas object model. I
will update it to add more explanation about the Observer class, but
everything done by this class is explained in its page documentation.
Regards,
--
Benoit Minisini
More information about the User
mailing list