Traballar con widgets

4.1. Para seleccionar widgets da xanela de paleta

Pode traballar con widgets da xanela Paleta das seguintes formas:

Modo de selección

Para usar o modo de selección, prema na frecha do Selector. O punteiro do rato cambiará a unha frecha para indicar que o modo de selección está activado. Neste modo, pode usar o rato para seleccionar widgets no seu proxecto. Entón poderá usar a xanela de Propiedades para editar as propiedades dos widgets.

Tamén pode usar o menú contextual para seleccionar un widget. Prema co botón dereito do rato sobre un widget para abrir un menú contextual do widget.

Desde a Paleta pode engadir múltiples widgets dun tipo específico ao seu proxecto mantendo premida a tecla Control cando seleccione un widget. Debe premer sobre a tecla do Selector ou sobre outro widget na Paleta para volver ao modo normal.

Modo de emprazamento de widgets

To use widget placement mode, select a widget in the Palette window. When you select most widgets, the pointer changes to a pointer-plus-cross. You can then place the widget inside containers, top-level widgets, and so on. After you place a widget, the mode returns to selection mode.

Modo de emprazamento de nivel superior

To use top level placement mode, select a defined top-level widget in the Palette window. When you select a top-level widget in the Palette window, the widget appears immediately on your desktop. You can then edit the widget. After you select a top-level widget, the mode returns to selection mode.

4.2. Para organizar os widgets no seu proxecto

You use widget containers, or boxes, to layout and organize widgets in your project window. You can choose the following widget containers from the Palette window:

  • Caixa horizontal
  • Caixa vertical
  • Táboa
  • Posicións fixas
  • Botonera horizontal
  • Botonera vertical
  • Paneis horizontais
  • Paneis verticais
  • Caderno
  • Marco
  • Xanela con barras de desprazamento
  • Área de visualización

You can nest boxes to create complex layout structures. When you create horizontal and vertical boxes, Glade asks you how many rows or columns to create initially, though rows and columns can easily be added or deleted later.

When you have created all the boxes you require, you can add specific widgets like labels, buttons, and more complicated widgets into the boxes. Notice that Glade packs widgets into the layout which eliminates a lot of tedious work. The use of boxes enables windows to change size to accommodate different size labels in different languages when the application is localized.

4.3. Para emprazar un widget no portapapeis

To remove a widget from a parent and place the widget on the clipboard, select the widget then choose Edit ▸ Cut.

4.4. To Copy a Widget to the Clipboard

To copy a widget to the clipboard, select the widget then choose Edit ▸ Copy. The original widget remains attached to the parent.

4.5. To Paste a Widget From the Clipboard Into Your Project

To paste a widget that exists on the clipboard into your project, choose Edit ▸ Paste.

All widgets must have a unique name within Glade. If you cut a widget, and then paste the widget into your project, then the widget and all of the children of the widget keep their original names. If you copy a widget, or paste the widget multiple times into your project, then Glade generates new names for the widget copies.

4.6. Para eliminar un widget

To delete a widget from the parent without moving the widget to the clipboard, select the widget then choose Edit ▸ Delete.

4.7. Para cambiar unha propiedade dun widget

The property editor is used to edit the properties of a selected widget. To change a property of a widget, select the widget and then enter an appropriate value in one of the Property window's property fields.