RE: [gtkmm] TreeView::get_column_cell_renderer
- From: Peter Gasper <pgasper designadvantage com>
- To: Murray Cumming Comneon com
- Cc: gtkmm-list gnome org
- Subject: RE: [gtkmm] TreeView::get_column_cell_renderer
- Date: 10 Jul 2003 09:17:36 -0600
My apologies. The documentation said to use a dynamic cast and I had
never heard of such a thing before, nor seen any example anywhere on how
to do it; this seemed to be as good a place as any to ask. I will be
more careful in the future.
thanks.
On Thu, 2003-07-10 at 00:53, Murray Cumming Comneon com wrote:
> Murray Cumming
> murrayc usa net
> www.murrayc.com
>
> > -----Original Message-----
> > From: Peter Gasper [mailto:pgasper designadvantage com]
> > Sent: Mittwoch, 9. Juli 2003 17:50
> > To: gtkmm-list gnome org
> > Subject: [gtkmm] TreeView::get_column_cell_renderer
> >
> >
> > I want to modify the properties of a cell renderer. I can use the
> > following function to get the cell renderer for a column. But I am not
> > sure how to do the syntax for the dynamic cast descriped below:
> >
> > CellRenderer* Gtk::TreeView::get_column_cell_renderer
> > (
> > int
> > n
> > )
> >
> >
> >
> > Gets the CellRenderer for that
> > column.
> >
> > You should dynamic_cast<> to the
> > expected derived CellRenderer type.
> > This assumes that the TreeViewColumn
> > contains only one CellRenderer.
> >
> >
> > If I try the following it complains because get_column_cell_renderer
> > returns a CellRenderer and not a CellRendererToggle:
> >
> > Gtk::CellRendererToggle *cell=get_column_cell_renderer(column);
>
> It would be nice if you asked pure C++ questions somewhere more appropriate.
>
> Gtk::CellRendererToggle* cell = dynamic_cast<Gtk::CellRendererToggle*>(
> get_column_cell_renderer(column) );
>
> > cell->set_radio(true);
> >
> > thanks.
> >
> > --
> > Peter Gasper <pgasper designadvantage com>
> >
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
--
Peter Gasper <pgasper designadvantage com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]