Daniel,
Your code was very helpful. As it turned out, my event box code was
working fine. When Aneesh Dogra updated the code to use GTK3 he neglected
to change the use of .value in Gtk.Adjustment to get_value() and
set_value(). As a result the Activity was processing the arrow keys OK but
could
Sigh, I hoped gtk3 had got rid of the no-window widgets mess...
I think you need to use EventBox with a window and grab_focus on
button_press events. See the attached test.
On 1 March 2013 18:32, James Simmons wrote:
> Daniel,
>
> I played with your code last night at home. I modified it so it
Daniel,
I played with your code last night at home. I modified it so it actually
loads pictures in the left and right Gtk.Image. I found that when I tabbed
through the controls in the window that the focus_in and focus_out methods
were invoked. However, when I tried to change the focus by click
Daniel,
Thanks, that's a big help!
James Simmons
On Thu, Feb 28, 2013 at 10:20 AM, Daniel Narvaez wrote:
> GtkImage only works for me:
>
> from gi.repository import Gtk
>
> def image1_focus_in_cb(a, b):
> print("focus in 1")
>
> def image1_focus_out_cb(a, b):
> print("focus out 1")
>
>
GtkImage only works for me:
from gi.repository import Gtk
def image1_focus_in_cb(a, b):
print("focus in 1")
def image1_focus_out_cb(a, b):
print("focus out 1")
def image2_focus_in_cb(a, b):
print("focus in 2")
def image2_focus_out_cb(a, b):
print("focus out 2")
window = Gtk.W
Two things you could try:
- set_visible_window(True) the event box and also set_can_focus
- Remove the box and set_can_focus the image.
On Thursday, 28 February 2013, James Simmons wrote:
> Gonzalo,
>
> The problem with that it I want the arrow keys to page through the images
> only when the im
Gonzalo,
The problem with that it I want the arrow keys to page through the images
only when the image has the focus. There are other places in the Activity
where I don't want to interfere with the arrow keys. For instance, you can
make annotations for a specific image.
I notice that GtkImage i
Can you catch the key-press-event in the activity class?
I think other activities like Read or Terminal do this.
Gonzalo
On Wed, Feb 27, 2013 at 1:53 PM, James Simmons wrote:
> Aneesh,
>
> I'm trying to incorporate your GTK3 update to View Slides and release the
> result on ASLO. The problem I
Aneesh,
I'm trying to incorporate your GTK3 update to View Slides and release the
result on ASLO. The problem I'm still having is that I cannot page through
the images using the keyboard as I used to. What I did in the past was to
nest the image control in an event box and make the event box abl
Hi James,
2013/2/24 James Simmons :
> I was looking at the upgrade to GTK3 done for View Slides and it seems that
> it no longer responds to the keyboard. What I had done previously to get it
> to do that was to put the image I was displaying in an event box. I then
> made the event box accept t
I was looking at the upgrade to GTK3 done for View Slides and it seems that
it no longer responds to the keyboard. What I had done previously to get
it to do that was to put the image I was displaying in an event box. I
then made the event box accept the focus like this:
self.eventbox.set_events
11 matches
Mail list logo