The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Каталог документации / Раздел "Perl" / Оглавление документа

Chapter 45. HandleBox

Inheritance Hierarchy

Object
   +--- Widget
         +--- Container
               +--- Bin
                     +--- HandleBox
         

The HandleBox is a container widget that allows its children to detach from a window. This is usually used for detachable toolbars, as shown in the Toolbar example .

You can create a HandleBox with the following function:

$handlebox = new Gtk::HandleBox();

You can set the HandleBox's shadow type using:

$handlebox->set_shadow_type( $shadow_type );

Where $shadow_type is either 'none', 'in', 'out', 'etched_in', or 'etched_out'.

You can set which side of the HandleBox the handle is drawn using:

$handlebox->set_handle_position( $handle_position );

Where $handle_position is either 'left', 'right', 'top', or 'bottom'.

You can also set the snap edge of a HandleBox. The snap edge is the edge of the detached child that must be aligned with the corresponding edge of the "ghost" left behind when the child was detached to reattach the torn-off window. The snap edge is set using:

$handlebox->set_snap_edge( $snap_edge );

The values for $snap_edge are the same as for $handle_position above. Usually, the snap edge should be chosen so that it stays in the same place on the screen when the handlebox is torn off. If the snap edge is not set, then an appropriate value will be guessed from the handle position. If the handle position is 'right' or 'left', then the snap edge will be 'top', otherwise it will be 'left'.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру