ui.ComboBox.Create()

ui.ComboBox.Create() creates a combo box.

Syntax

LET ui.ComboBox.create("cmb_id", "container_id")

Arguments

cmb_id

identifier for the combo box you create (STRING)

container_id

identifier of the container where the combo box must be inserted (STRING)

Usage and examples

Takes two arguments - cmb_id and container_id:

LET cmb = ui.Combobox.Create("cmb1", "f1")

If you create several combo boxes, their identifiers must be unique.

 

ui.ComboBox.Create() only creates a combo box but does not put it to the correct place in the form.

You must directly specify where to put a combo box created by this method in your 4gl code.

For example, this is how you insert a combo box to a form with a GridPanel:

DEFINE cmb ui.ComboBox

DEFINE rLocation ui.GridItemLocation

...

LET rLocation.GridHeight = 1

LET rLocation.GridWidth = 1

LET rLocation.GridX = 0

LET rLocation.GridY = 0

CALL cmb.SetGridItemLocation(rLocation)

 

If you do not specify the combo box identifier (= cmb_id, you will still be able to manipulate it via ui methods, but will not be able to make any manipulations that require this id:

LET cmb = ui.Combobox.Create("", "rootContainer")

For example, you will not be able to change its appearance via .qxtheme or .css.

 

If you specify a wrong container - the one absent from the form, you will get a runtime error – 1044. No name equivalent.

If you do not specify any container, you will get a runtime error – 2007. Invalid reference:

LET cmb = ui.Combobox.Create("cmb1", "")

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.