Background property group

The group of background properties is used to change backgrounds of windows, containers, and widgets.

Do not confuse background properties with image properties: Background properties are used to change the background appearance of a window, container, or widget; whereas image properties are used to add and change appearance of foreground images.

Element background can be changed in Lycia Theme Designer, and via css styles.

Form XML code:

<element_name.background>

   <Background>

      <...>

   </Background>

</element_name.background>

Inheritance diagram:

Associated containers, widgets and theme elements:

BorderPanel

CoordPanel

GridPanel

GroupBox

StackPanel

ScrollViewer

Tab

TabPage

Table

TreeTable

BlobViewer

Browser

Button

Calendar

Canvas

CheckBox

ComboBox

FunctionField

Label

MenuGroup

MenuCommand

ProgressBar

RadioGroup

Slider

Spinner

TextArea

TextField

Toolbar

ToolbarButton

TimeEditField

WebComponent

Influence and behavior:

In Lycia Theme Designer, there are six separated properties which specify different font characteristics:

New Background

Fill Color

Background Image

Background Style

Size

Location

Here are different variants of adding the background properties:

Fill Color and Background Image properties can be applied separately or together.

You can find out how to set each property in its own page .

 

At runtime, you can use ui methods to change background characteristics of the form elements - containers, widgets, toolbars, and menubars.

For this purpose, you must define a variable of the ui.Background data type and apply these methods:

<var>.SetFillColor()

<var>.SetBackgroundImage()

<var>.SetBackgroundStyle()

<var>.SetSize()

<var>.SetLocation()

4gl code sample

MAIN
DEFINE lb ui.Label
DEFINE bg ui.Background
DEFINE sc ui.SystemColor
OPEN WINDOW w WITH FORM "background_ui" ATTRIBUTE(BORDER)
  LET lb = ui.Label.ForName("lb1")
    CALL bg.SetBackgroundImage("qx://application/querix.png")
    CALL bg.SetBackgroundStyle("Centered")
    CALL sc.SetSystemColorName("LightCyan")
    CALL bg.SetFillColor(sc)
   CALL lb.SetBackground(bg)
CALL fgl_getkey()
END MAIN

default appearance

(in the form)

runtime appearance

Try the example program to try and test manipulating element background with ui methods.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.