company logo

Layout - Layout

The layout defines the way data will be displayed in a control. It includes the text font, text color and background color. Layout settings for a GUI resource might be provided in a Layout instance. Layout properties might be changed and the layout might be set as current layout for the connected GUI resource.

Layout properties may differ from the settings in the control, since changed layout properties do not apply immediately to the related GUI resource. In order to apply the current settings, the layout has to be passed to the layout property of the GUI resource.

In order to update the current settings from of the GUI resource, the appropriate layout property should be reloaded.

Layout definitions for elements in complex controls (trees, tables or lists) are provided in a hierarchical order.

  • Cell
  • Line
  • Column
  • Region
  • Control

When no cell layout has been set, the line layout is used. When no line layout is set, the column layout is used instead. When no column layout is set, the region layout is used. And when no region layout has been set, the control layout is used.

... fragment ( ControlContext &cc) {

  Font     font(cc);

  

  font.get();

  if ( !font.italic() ) {  // when not yet italic

    font.italic(true);     // change to italic

    font.set();            // send changes to control

  }

}

Attributes
    Functions