Re: how to show button stock item without text?
- From: "Germán Diago" <germandiago gmail com>
- To: gtkmm-list gnome org
- Cc: Paul Davis <paul linuxaudiosystems com>
- Subject: Re: how to show button stock item without text?
- Date: Mon, 15 Sep 2008 12:14:40 +0200
2008/9/15 Paul Davis <paul linuxaudiosystems com>:
> On Sun, 2008-09-14 at 23:14 +0200, Germán Diago wrote:
>> Sorry, I didn't express myself clearly. I've got a Gtk::Button, and if
>> I put a Gtk::BuiltinStockID as a parameter,
>> it appears the text and the image. I want to show just the image,
>> without the text. Is there a simple way?
>> Or maybe I have to copy the icons in my own directory and load the
>> images with set_image? Thank you
>
> its pretty easy.
>
> Widget* image;
>
> image = manage (new Image (Stock::ADD, ICON_SIZE_BUTTON));
> image->show();
> your_button->add (*image);
>
>
>
>
But I have to load my own image, haven't I? If the theme changes, I
cannot change the image. And if I hardcode
paths to the icons for gnome icons, those icons could be installed in
another dir in a different system. So what I really
wanted is to load a Gtk::BuiltinStockID and remove the text. What you
answered me is what I've done for now, but I'd like
to know if it's possible the other way. Thank you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]