STYLE Attribute

Overview

STYLE Attribute Usage Examples

Predefined Lycia Classes

Applying a Style From the Custom Class

Overview

Different to classic 4GL, dialog windows in Lycia have to be placed and aligned using the ATTRIBUTE clause with the STYLE attribute.

The STYLE attribute is used to link a window, a form or a 4GL statement to a class filter specified in the current theme file. This makes possible changing the display properties according to the context without adding extra 4GL code.

The STYLE attribute can be used with a single statement or used as a function argument.

 

Return to top

STYLE Attribute Usage Examples

MAIN

OPEN WINDOW cen AT 1,1 WITH 10 ROWS, 80 COLUMNS ATTRIBUTE(BORDER, STYLE="top-center")

 

CALL fgl_getkey()

END MAIN

 

MAIN

MENU

COMMAND "center"

CALL open_win("center")

COMMAND "cen-left"

CALL open_win("center-left")

COMMAND "cen-right"

CALL open_win("center-right")

COMMAND "stretch"

CALL open_win("stretch")

COMMAND "str-left"

CALL open_win("stretch-left")

COMMAND "str-right"

CALL open_win("stretch-right")

COMMAND "bot-left"

CALL open_win("bottom-left")

COMMAND "bot-right"

CALL open_win("bottom-right")

COMMAND "bot-str"

CALL open_win("bottom-stretch")

COMMAND "bot-cnt"

CALL open_win("bottom-center")

COMMAND "top-left"

CALL open_win("top-left")

COMMAND "top-right"

CALL open_win("top-right")

COMMAND "top-str"

CALL open_win("top-stretch")

COMMAND "top-cnt"

CALL open_win("top-center")

COMMAND "dialog"

CALL open_win("dialog")

 

COMMAND "exit"

EXIT MENU

END MENU

END MAIN

 

FUNCTION open_win(s)

DEFINE s STRING

OPEN WINDOW cen AT 1,1 WITH 10 ROWS, 80 COLUMNS ATTRIBUTE(BORDER, style=s)

CALL fgl_getkey()

CLOSE WINDOW cen

END FUNCTION

 

Return to top

Predefined Lycia Classes

Window Type:

Style Description
full-screen The window will be opened in the full screen mode

 

Window Position:

Style Description
center The window will be placed in the center of the view area.
center-left The window will have a leftmost X position and central Y position.
center-right The window will have a rightmost X position and central Y position.
stretch The window will be stretched to take the whole view area.
stretch-left The window will have a leftmost X position and will be stretched along Y axis.
stretch-right The window will have a rightmost X position and will be stretched along Y axis.
bottom-left The window will take the lower-left corner of the view area.
bottom-right The window will take the lower-right corner of the view area.
bottom-stretch The window will be placed in the bottom of the view area and will be stretched along X axis.
bottom-center The window will be placed in the bottom of the view area, with central horizontal alignment.
top-left The window will have a leftmost X position and top Y position.
top-right The window will have a rightmost X position and top Y position.
top-stretch The window will be placed in the top of the view area and will be stretched along X axis.
top-center The window will be placed in the top of the view area, with central horizontal alignment.
dialog The window will be displayed in the form of a draggable dialog.

 

Status Bar: Refer here for the Status Bar styles.

 

Return to top

Applying a Style From Custom Class

The attribute needs the class name to be passed as a character value: ATTRIBUTE(STYLE="my_class").

Note: For the style class, you can use custom class from .qxtheme XML file or .css file selector

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.