RE: [gtkmm] How to sort the widgets in a box?
- From: Murray Cumming Comneon com
- To: seguso forever tin it, abas aix meng auth gr
- Cc: gtkmm-list gnome org
- Subject: RE: [gtkmm] How to sort the widgets in a box?
- Date: Tue, 16 Dec 2003 14:58:32 +0100
> Thanks, I tried but I got errors:
>
> class ModelColumns : public Gtk::TreeModel::ColumnRecord
> {
> public:
>
> ModelColumns() { add(m_col_text); add(m_col_go_button);}
>
> Gtk::TreeModelColumn<std::string> m_col_text;
> Gtk::TreeModelColumn<Gtk::Button> m_col_go_button; //
> error here****
> };
The model should contain data, but it looks like you are trying to put some
view representation in the model, hoping that it magically works. More
importantly, you are adding a non-copyable type - Gtk::Button. You can't
copy a Gtk::Button, because there is no public constructor. If you really
want to, for whatever reason, you can use a Gtk::Button* instead, because
you can copy that.
If you want to create a custom CellRenderer, you might look at the
cellrenderercustom example in the gtkmm tarball:
http://cvs.gnome.org/lxr/source/gtkmm/examples/cellrenderercustom/
But I don't promise that that is as simple as it could be.
Murray Cumming
www.murrayc.com
murrayc usa net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]