Re: new_from_stock
- From: turkaye dre vanderbilt edu (Emre Turkay)
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: new_from_stock
- Date: Mon, 25 Apr 2005 09:05:23 -0500
Hi Folks,
I've realized that glade handles this situation well. So I put a
button with a label in glade and let it generate C code for me. It
seems that it is using the button with an HBox (maybe this is a
workaround for the problem), i.e. it is adding an image and a label
separately. It is also using alignment, however I don't need it. So my
code now looks like this, and works as intended. Sending list for the
people having the same problem:
class New_Button: public Gtk::ToggleButton {
public:
New_Button(const Glib::ustring& text)
: Gtk::ToggleButton(),
img_(Gtk::StockID("gtk-add"),
Gtk::IconSize(Gtk::ICON_SIZE_BUTTON)),
lbl_(text)
{
setup_box();
}
protected:
void setup_box()
{
img_.show();
lbl_.show();
box_.pack_start(img_);
box_.pack_Start(lbl_);
box_.show();
this->add(box_);
}
private:
Gtk::Image img_;
Gtk::Label lbl_;
Gtk::HBox box_;
};
Thanks for your helps,
emre
On Sun, Apr 24, 2005 at 03:19:15PM +0200, Murray Cumming wrote:
> On Sat, 2005-04-23 at 12:57 -0500, Emre Turkay wrote:
> > Hi Folks,
> >
> > In the gtkmm documentation for Gtk::Image (and therefore in some .h
> > files distributed with gtkmm) the method Gtk::Image::new_from_stock()
> > is referred, however I couldn't find where it is defined (i.e., I
> > 'grep'ed the /usr/include/gtkmm-2.0 directory and couldn't find it.)
> >
> > What may be wrong?
>
> The documenation is partly automatically generated from the C API's
> documentation, and this new part (in 2.6) was not correctly transformed.
> I've fixed it now.
>
> --
> Murray Cumming
> murrayc murrayc com
> www.murrayc.com
> www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]