[Glade-users] shift a image
- From: tvb at gnome.org (Tristan Van Berkom)
- Subject: [Glade-users] shift a image
- Date: Thu, 05 Apr 2007 12:28:02 -0400
On Thu, 2007-04-05 at 07:03 +0100, amit bag wrote:
Hi Tristan,
I have four images in one window by using
Gtkfixed. Then I add a cursor image innitially on
image one and I want to shift the cursor image to
image NO. 2 when I press the right arrow key .For that
I have to select key_press_event .But I don't know how
to move the cursor image from one image to the other
by pressing the arrow key .I think now you r getting
what I want .Please help me .
Yes I get it now...
There are a few ways you can do this, I would connect
to key-press-event on the GtkFixed parent and make
sure that GTK_CAN_FOCUS (fixed) but also make sure
that (!GTK_CAN_FOCUS (image_children)), this way you
only have to catch the key-press-event on ONE widget
if that widget has keyboard focus.
As a technical side note, ofcourse you must be sure
that the fixed widget's event mask is setup properly
to recieve key events.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]