On samedi 13 septembre 2008, Ian Roper wrote:
> It would be nice to have this as a standard method for these sort of
> controls. :)
>

You can actually do that easily in your own projects by reimplementing these 
controls.

For example, for the ListBox, creates a "ListBox" class in your project, and 
put that in it:

--8<-- ListBox.class ----------------------------------------------

EXPORT

PRIVATE $hObserver AS Observer

PUBLIC SUB _new()

  $hObserver = NEW Observer(ME) AS "ListBox"

END

PUBLIC SUB ListBox_KeyPress()

  ' Put your code there
  ...

END

PUBLIC SUB ListBox_LostFocus()

  ' Put your code there
  ...

END

-------------------------------------------------------------------

Normally (I didn't test!), all ListBox controls will gain your key management 
automatically. Then you can do that for other controls if you want.

If it does not work, it should be a bug in Gambas!

And, as Doriano said, UCase() works only with ASCII strings. So you should use 
String.UCase() instead, which deals with UTF-8 strings.

Regards,

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to