Re: ToggleButton Change Icon
- From: muppet <scott asofyet org>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: ToggleButton Change Icon
- Date: Wed, 25 Aug 2004 08:02:42 -0400
On Aug 25, 2004, at 4:20 AM, Jan Hudec wrote:
On Tue, Aug 24, 2004 at 19:49:40 +0200, A. Pagaltzis wrote:
* William B Carlson <carls107 msu edu> [2004-08-24 18:39]:
The rest of my buttons in the toolbar I'm adding
$toolbar->insert_stock and the icon button is a square, the
image is at the top and the text is at the bottom.
insert_stock() part of the old API. see below.
Is there anyway to get this button to match what my other
buttons look like on the toolbar?
Probably by using Gtk2::ToggleToolButton -- it inherits from
ToggleButton, but I don't see it adding anything other than
->new_from_stock.
It does not have to add anything. The only thing it needs to add it
honouring setup of the toolbar! Everything else is just inherited from
Gtk2::ToggleButton
erm, actually, ToggleToolButton inherits from ToolButton, which already
has the stock-id property, and adds toggle-ness.
however, gtk_toolbar_insert_stock() is part of the "old" toolbar API,
which is deprecated as of 2.4 and does not work with the "new" 2.4
action-based toolbar API, of which ToggleToolButton is a part. that
is, if you've used any of the old api functions on your toolbar, you
can't use any of the new functions on it, and vice versa.
i'd suggest converting to the new API if you can, because the
action-based stuff is quite superior as a full-app solution goes.
i'm reasonably sure that it's possible to do what you want with the old
API, but i don't know how.
--
I don't have a drinking problem,
'cept when i can't get drink.
-- Tom Waits
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]