Redrawing



Hello, all!

I have an question: how to set an delay in my prog to
make sure, that SUB1 is running, *then* SUB2? Ok :) For
example, this code works, but VERY UGLY:

sub cosmetics {
    $my_message->show(); # This shows message "PLEASE WAIT..."
}

sub sub1 {
    $textwidget->backward_delete($textwidget->get_point());
# HERE MUST BE SOME FLAG A'LA "UPDATE" (or something else)
}

sub sub2 {
    &cosmetics();
    &sub1();
    $my_message->hide(); # <<< Here this widget must be HIDED first,
                         # and only later then this one:

$textwindget->insert(undef,$text1->style->black,undef,"Bla-bla-bla\n");

}

for (1..5) {
    &sub2();
}

So I have a trouble with text widget or another widget repaintings...
:o(
In TCL/TK I do just:

proc {something} {} {
     show_one_widget;
     update; # <<< That, what I need!!!
     show_another_widget;
     update;
}

...and all the widgets are repainted first and sub gets an callback.
How to in GTK/Perl? Help me plz.

--
Pagarbiai, Bo.






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