How to repaint widgets??



Help!!!
I've tried to write a news program with Gtk.
And I use gtk_button to simulate the hyperlink text("parse uline", and
set button relief to "none").
I initialize some button and then fetch news title from MySQL database.
When button clicked, I must hide some button that doesn't need.
(Because under "sports", "health", "network",..., there are different
number of news)
  For example:
            I initialize 25 buttons for news title.But when I clicked
"sports", there are only 10 news.
            So I should hide the other 15 buttons and set the 10
button's label to the news title.
            But if I clicked "network" and it has 20 news, then I shoud
show the other 10 buttons which was
            hide before and then set the 20 button's label to network's
news title.

But some problems occurs.
When I use gtk_widget_show() to show those buttons.Sometimes they
wouldn't show immediately.
It will show until "mouse over" that button.
I've tried gtk_widget_show_now() but it still the same.
Can someone tell me how to solve this problem?
Thank you very much!!!!







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