Re: Gtk::Widget::destory() ?



Maik,

Given what you've described, why not just call 'delete' on your C++ widget pointer?  This will cause the underlying
C instance to get destroyed, as well, which, in turn, will cause the widget to be dropped from the parent container.

Regards,

Nickolai


PS  Please be sure to CC your questions to the gtkmm mailing lists.  This way, more people will read it.


On 10/5/06, Maik Beckmann <maikbeckmann gmx de> wrote:

> I know, sometimes you have no choice other than going low level to get
> what you want, but is there anything specific
> that you are trying to achieve by dealing with 'destroy' directly?
>
>
> Regards,
>
> Nickolai

Hello Nickolai

I want to show the progress of downloads (running as threads). If a new
download starts, a new instance of ProgressBar is allocated on heap and
added to the VBox. When a download finishes, the related ProgressBar
should be removed from the VBox and since there is no need for it any
longer also destroyed. At the moment I using gtk_widget_detroy:

    gtk_widget_destroy((GtkWidget*)pPgb->gobj());

Which way is the default one?

Thanks in advance
Maik




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