imagePosition

 

imagePosition specifies where images are located in the widget with respect to its text.

 

 

in Lycia Form Designer

 

in Lycia Theme Designer

 

Form XML code:

 

<element_name.image>

   <Image imageUrl="qx://application/lycia" imagePosition="Top"/>

</element_name.image>

 

By default, widgets have no images and, thus, this property is absent from the form XML code. The property value will appear in the form XML code only once any image is added to the form.

 

 

Theme property filter XML code:

 

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>Image</PropertyName>

      <PropertyName>ImagePosition</PropertyName>

    </PropertyPath>

  </SetProperty>

</DoStyleAction>

 

Possible values:

 

Default value: not specified (in Lycia Form Designer), left (in Lycia Theme Designer)

 

Inheritance diagram:

 

 

Associated containers, widgets and theme elements:

TabPage

Button

Label

RadioButtonListItem

ToolbarButton

 

Associated ui methods:

SetImagePosition

GetImagePosition

 

Influence and behavior:

 

Left

Image is located to the left of the element' text.

Right

Image is located to the right of the element' text.

Top

Image is located on the top of the element' text.

Bottom

Image is located below the element' text.

 

Use the textAlignment property to change the position of an image in image-only widgets:

 

With textAlignment=Default, Default:

 

With textAlignment=Center,Center:

 

With textAlignment=Right, Bottom:

 

 

 

 

 

 

At runtime, image position can be changed with ui methods:

 

4gl code sample

DEFINE bt_ui     ui.Button,

       image_ui  ui.Image

...

LET bt_ui = ui.Button.forName("bt1")

CALL image_ui.setImageUrl("qx://application/lycia.png")

CALL image_ui.setImagePosition("Top")

CALL bt_ui.SetImage(image_ui)

 

runtime appearance

 

 

Example programs:

CVS server: client.querix.com

CVS repository: /lycia_doc_examples

User: client

Project: form_properties

Program: imagePosition

 

Related articles:

Image

New Image

imageUrl

imageScaling

size