CList selection and focus
| From: | André Jansen | Date: | Sun, 30 May 2004 01:34:16 +0000 |
| Subject: | CList selection and focus | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4588@lists.php.net to get a copy of this message | ||
Hi all,
New to this list, new to PHPGTK, but otherwise pretty confortable with
PHP and a handfull of other scripting languages, although I am not an
expert programmer...
I am running PHPGTK 1.0 on win2k sp4.
Currently I'm building a database app, and I'm using the CList widget in
various places, even if I do not require multiple columns. The reason
being that the List widget does not seem to give any visual clues as to
whether or not it has keyboard focus.
I am using a single column CList with 200 or so entries in Browse
selection mode. In order to speed up navigation, I wrote a handler that
picks up key-press events and selects the first consecutive row where the
first character of the entry text corrisponds with the pressed key. The
aim is to have the list behave in a manner similar to the HTML SELECT
element and most other GUI list widgets I'm familiar with.
The handler uses the select_row() method, and it works. BUT:
Even when the list is in Browse mode, the keyboard focus does not follow
the selection (as it does when navigating the list with the up/down arrow
keys).
Is there some way to move the focus along with the selection?
Any suggestions, pointers appreciated.
TIA,
--
André
============================================================
I'm out of my mind, but feel free to leave a message...