RE: 2 (simple?) questions



> -----Original Message-----
> From: gtk-list-admin gnome org [mailto:gtk-list-admin gnome org]On
> Behalf Of John Cupitt ng-london org uk
> Sent: Tuesday, August 20, 2002 8:09 PM
> To: xychu poczta fm
> Cc: SimLetters gmx de; gtk-list gnome org
> Subject: Re: 2 (simple?) questions
>
>
> Krzysztof Magrel wrote:
> >>>2. How can I change active widget? Tab key only can change coursor
> >>>position
> >>>to the next widget. I want to change active widget from
> >>
> >>source level. (It
> >>
> >>>depends what user of program will do). I know that it is
> >>
> >>not possible for
> >>
> >>>some widgets (ie.labels, etc).
> >>
> >
> > I use gtk-1.2. I tried to find, but niether gtk_widget_grab_focus or
> > gtk_widget_activate doesnt work for me :(
> > And for 1st question i have no Idea :_(
>
> Hi, gtk_widget_grab_focus() works for me, what problem were
> you having
> with it?
I've got Segmentation Fault :_(
My function to change active widget looks like:

void
przejdz (char *element, GtkWidget * mw)
{
// Change active widget to widget with name element
  GtkWidget *w;
  if ((w = lookup_widget (mw, element)) == NULL)
    return;
  gtk_widget_grab_focus (w);
  return;
}

and for example:

przejdz("entry3",main_window);

make 1 or 2 seconds without reaction (coursor doesn't) change it's position
(program freezes) and after this time window closes with Segmentation Fault
message.


>
> There are a bunch of freeze/thaw functions in gtk+-1.2, but
> they don't
> work very well and have all been removed for gtk2 (I think). gtk2 is
> much more sensible about painting the screen and you don't
> need this trick.
>
> John
>
>
>
> ==========================================================
> Fabric of Vision
> Dress and Drapery in Painting
>
> 19 June - 8 September 2002
>
> For information and tickets:
> http://www.nationalgallery.org.uk/exhibitions/fabric/
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
> Zgodz sie, co Ci szkodzi... >>> http://link.interia.pl/f163b
>
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]