Re: [gtkmm] Yet another custom cell renderer question :-(
- From: Frank Naumann <fnaumann cs uni-magdeburg de>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Yet another custom cell renderer question :-(
- Date: Thu, 30 Oct 2003 17:43:24 +0100 (CET)
Hello!
> I want to reuse a custom widget that is not a Gtk::CellEditable, so I
> believe I cannot do it "the Spinbutton way".
> What is frustrating is that my custom widget is a Gtk::VBox which
> *contains* a Gtk::SpinButton, but with other stuff around.
I have written a CellRenderer with a Combobox in it (not the complicated
gtkmm example, much easier). From my experience it should be enough if you
create a container class from an CellEditable and EventBox that hold your
widget:
class MyCellEditable : public Gtk::EventBox, public Gtk::CellEditable
{
public:
MyCellEditable(void)
{
...
widget.show();
add(widget);
...
}
protected:
virtual void start_editing_vfunc(GdkEvent *event);
virtual bool on_key_press_event(GdkEventKey *event);
private:
mywidget widget;
}
Regards,
Frank
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]