Re[2]: [PHP-GTK] GtkCList focus
| From: | Tom Rogers | Date: | Tue, 01 Feb 2005 23:39:31 +0000 |
| Subject: | Re[2]: [PHP-GTK] GtkCList focus | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5519@lists.php.net to get a copy of this message | ||
Hi,
Wednesday, February 2, 2005, 5:55:16 AM, you wrote:
CW> Hi again,
>> Unfortunately, I don't know how to set the focus on a specific row -
>> selecting is easy, but the focus stays on the first one.
CW> It seems that there is no function which does this:
>>
>> http://mail.gnome.org/archives/gtk-list/2001-August/msg00243.html
CW> The only way shall be to set the "data field"; I assume this is the
CW> "focus_row" property. Again no luck here: This property is read-only in
CW> PHP-Gtk.
CW> @Andrei:
CW> Would it be possible to make this writeable in php-gtk 1.0.2?
CW> Regards/MfG,
CW> Christian Weiske
CW> --
CW> XMMS is playing now:
CW> 2 Raum Wohnung - wir werden singen
Here is a post I made about this some time ago which may help.
"I have been playing with this and ended up modifying gtkclist.c to
fix the problem. If you want I can send you libgtk-0.dll for you to
try or if you compile your own gtk dll add the following to the
end of real_select_row function in gtkclist.c
if (CLIST_UNFROZEN (clist) && (gtk_clist_row_is_visible (clist, row) !=
GTK_VISIBILITY_NONE))
GTK_CLIST_CLASS_FW (clist)->draw_row (clist, NULL, row, clist_row);
/* new bits below */
gtk_clist_draw_focus (GTK_WIDGET (clist));
gdk_gc_set_line_attributes (clist->xor_gc, 1, GDK_LINE_SOLID, 0, 0);
clist->focus_row = row;
gtk_clist_draw_focus (GTK_WIDGET (clist));
"
--
regards,
Tom