GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gtk2::Button(3) User Contributed Perl Documentation Gtk2::Button(3)

Gtk2::Button - wrapper for GtkButton

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::Button

  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Activatable

Mnemonics are "memory aids"; in GTK+, a mnemonic is an underlined character which corresponds to a keyboard accelerator. For a button, that means pressing Alt and that key activates the button.

For convenience, Gtk2-Perl uses mnemonics by default on widgets that support them. If characters in label string are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). If you don't want to use mnemonics at all, use the non-mnemonic version explicitly (e.g. "Gtk2::Button::new_with_label").

$mnemonic (string) used to label the widget, see "MNEMONICS"

$stock_id (string) creates a new button using the icon and text from the

specified stock item, see Gtk2::Stock

$label (string) used to label the widget

$mnemonic (string) used to label the widget, see "MNEMONICS"

Since: gtk+ 2.4

  • $xalign (double)
  • $yalign (double)

Since: gtk+ 2.4

Since: gtk+ 2.22

Since: gtk+ 2.4

$focus_on_click (boolean)

Since: gtk+ 2.4

Since: gtk+ 2.6

Since: gtk+ 2.10

$position (Gtk2::PositionType)

Since: gtk+ 2.10

$image (Gtk2::Widget or undef)

Since: gtk+ 2.6

$label (string)

$newstyle (Gtk2::ReliefStyle)

$use_stock (boolean)

$use_underline (boolean)

'focus-on-click' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether the button grabs focus when it is clicked with the mouse
'image' (Gtk2::Widget : default undef : readable / writable / private / static-nick / static-blurb)
Child widget to appear next to the button text
'image-position' (Gtk2::PositionType : default "left" : readable / writable / private / static-nick / static-blurb)
The position of the image relative to the text
'label' (string : default undef : readable / writable / construct / private / static-nick / static-blurb)
Text of the label widget inside the button, if the button contains a label widget
'relief' (Gtk2::ReliefStyle : default "normal" : readable / writable / private / static-nick / static-blurb)
The border relief style
'use-stock' (boolean : default false : readable / writable / construct / private / static-nick / static-blurb)
If set, the label is used to pick a stock item instead of being displayed
'use-underline' (boolean : default false : readable / writable / construct / private / static-nick / static-blurb)
If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key
'xalign' (float : default 0.5 : readable / writable / private / static-nick / static-blurb)
Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned
'yalign' (float : default 0.5 : readable / writable / private / static-nick / static-blurb)
Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned

'child-displacement-x' (integer : default 0 : readable / private / static-nick / static-blurb)
How far in the x direction to move the child when the button is depressed
'child-displacement-y' (integer : default 0 : readable / private / static-nick / static-blurb)
How far in the y direction to move the child when the button is depressed
'default-border' (Gtk2::Border : default undef : readable / private / static-nick / static-blurb)
Extra space to add for GTK_CAN_DEFAULT buttons
'default-outside-border' (Gtk2::Border : default undef : readable / private / static-nick / static-blurb)
Extra space to add for GTK_CAN_DEFAULT buttons that is always drawn outside the border
'displace-focus' (boolean : default false : readable / private / static-nick / static-blurb)
Whether the child_displacement_x/_y properties should also affect the focus rectangle
'image-spacing' (integer : default 2 : readable / private / static-nick / static-blurb)
Spacing in pixels between the image and label
'inner-border' (Gtk2::Border : default undef : readable / private / static-nick / static-blurb)
Border between button edges and child.

activate (Gtk2::Button)
clicked (Gtk2::Button)
enter (Gtk2::Button)
leave (Gtk2::Button)
pressed (Gtk2::Button)
released (Gtk2::Button)

  • 'left' / 'GTK_POS_LEFT'
  • 'right' / 'GTK_POS_RIGHT'
  • 'top' / 'GTK_POS_TOP'
  • 'bottom' / 'GTK_POS_BOTTOM'

  • 'normal' / 'GTK_RELIEF_NORMAL'
  • 'half' / 'GTK_RELIEF_HALF'
  • 'none' / 'GTK_RELIEF_NONE'

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.