Re: [gtkmm] How to force widget draw





From: Paul Davis <paul linuxaudiosystems com>
To: "Find All" <find_all hotmail com>
CC: gtkmm-list gnome org
Subject: Re: [gtkmm] How to force widget draw Date: Wed, 12 Nov 2003 11:01:17 -0500

>I've a Gtk::Statusbar widget that I use to display status info text to the
>user (what an strange use :-)).
>The problem that I'm having is that I push a text to the Gtk::Statusbar just
>before a call to a function that make a "hard" process (lot of CPU use).
>The text is displayed after the "hard" process functions ends.
>I've tried to force the graphic server to draw the statusbar by calling the >Gtk::Widget->show and Gtk::Widget->show_now function of the statusbar, but
>nothing.
>How can I show the text to the statusbar before the "hard" process?

  gtk_widget_queue_draw (widget);
  gtk_main_iteration();


I've try:

   statusbar->queue_draw();
   gtk_main_iteration();

    func(); // Lot of CPU use

and also

   gtk_widget_draw_queue((GtkWidget *)statusbar->gobj());
   gtk_main_iteration();

   func(); // Lot of CPU use

I've use gtk/gtk.h to get the gtk functions in C

But nothing. The text is displayed after de "hard" process. :-(

note that this method can be hazardous: if there are events pending,
then you will handle them before returning to your code. this can
severely mess up some kinds of code.

--p



_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger: http://messenger.microsoft.com/es




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