TimeEditField

Form and theme XML code and CSS element selector

Inheritance diagram

Most commonly used form and theme properties

Associated 4gl syntax and ui methods

Influence and behavior

Lycia is going to move to Material Design.

Some of the features described below are available only for the material-design version of Lycia.

TimeEditField is used to display and input time in order to facilitate input.

TimeEditField inserted in a GridPanel as seen in Lycia Form Designer:

Form XML code:

<TimeEditField visible="true" identifier="f1" gridItemLocation="0,0,1,1"/>

Theme element filter XML code:

<ElementFilter ElementName="TimeEditField">

   ...

</ElementFilter>

CSS element selector code:

qx-aum-time-edit-field

Inheritance diagram:

Most commonly used form properties:

classnames

dataType

fieldTable

noEntry

notNull

required

identifier

horizontalAlignment

verticalAlignment

preferredSize

Most commonly used theme properties:

Background

Font

Fore Color

Associated 4gl syntax:

DISPLAY 

INPUT 

Associated ui methods:

Create

ForName

Influence and behavior:

To add a TimeEditField to your form, you

Step 1. Choose a TimeEditField from the widgets palette by left-clicking its icon.

Step 2. Select the place in the form where you want to put the TimeEditField.

Step 3. Left-click the selected spot (cell or sector) to place the TimeEditField there.

Step 4. The TimeEditField is now added to your form, and you can see it in the Structure view.

 

There are two ways to enter time to the TimeEditField at runtime:

  1. To type in the time from the keyboard.
  2. To set time by means of the built-in time picker:

Here you can find out how to input data to time edit fields using the INPUT statement, e.g.:

INPUT BY NAME f1 WITHOUT DEFAULTS

To get correct results when inputting to a TimeEditField, ensure that data type set for the widget as well as the data type of the receiving variable are correct and correspond to the field purpose, i.e. DATETIME HOUR TO SECOND:

DEFINE f1 DATETIME HOUR TO SECOND

You can change appearance properties of a TimeEditField in Lycia Form Designer. However, we recommend applying appearance properties via master and user themes and css.

To apply a property to TimeEditFields, set their values in the master or user theme, directly or using filters.

property applied in the user theme:

theme XML code:

<?xml version="1.0" encoding="utf-8"?>

<StyleSheet xmlns="http://querix.com">

  <ElementFilter ElementName="TimeEditField">

    <StyleSheet>

      <DoStyleAction>

        <SetProperty>

          <PropertyPath>

            <PropertyName>Font</PropertyName>

            <PropertyName>Italic</PropertyName>

          </PropertyPath>

          <PropertyValue />

        </SetProperty>

      </DoStyleAction>

    </StyleSheet>

  </ElementFilter>

</StyleSheet>

runtime behavior:

 

In the example below, we use css to change the text style of the button:

.qx-aum-time-edit-field .qx-text {

    padding: 2px;

    padding: 5px 10px;

    color: white !important;

    font: bold 14px "Calibri","Helvetica Neue", Sans-Serif;

}

 

You can use ui methods to create a TimeEditField at runtime (see the example program):

LET tef = ui.TimeEditField.create("f1", "rootContainer")

You can also use ui methods to change the appearance of a TimeEditField at runtime:

 

You can specify the default appearance of a TimeEditField by setting different classes to the classNames property.

For example, the class leading-button changes the position of the picker button (for MD Lycia)::

default (= trailing):

leading:

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.