enableMultiSelection

 

 

enableMultiSelection allows selecting several items at a time with a ListBox.

 

in Lycia Form Designer

 

in Lycia Theme Designer

 

 

Form XML code:

 

<ListBox enableMultiSelection="true">

 

By default, the property is set to none and is absent from the form XML code. The property value will appear in the form XML code only once the property value is set.

 

Theme property filter XML code:

 

<DoStyleAction>

  <SetProperty>

    <PropertyPath>

      <PropertyName>EnableMultiSelection</PropertyName>

    </PropertyPath>

  </SetProperty>

</DoStyleAction>

 

Possible values: true, false

 

Default value: false

 

Associated containers, widgets and theme elements: ListBox

 

Associated ui methods:

SetEnableMultiSelection 

GetEnableMultiSelection 

 

Influence and behavior:

 

 

 

 

If enableMultiSelection is set to true, you will be able to select several ListBoxItems if keeping the SHIFT or CTRL keys pressed:

 

lycia form designer

 

 

4gl code

MAIN

DEFINE f1, f2 STRING

 

OPEN WINDOW w WITH FORM "isMultiSelection" ATTRIBUTE(BORDER)

 

INPUT BY NAME f1

DISPLAY f1 TO f2

 

CALL fgl_getkey()

END MAIN

 

runtime behavior

 

 

 

As the results of your selection are passed as a string, the receiving variable must accept a character string (CHAR, VARCHAR, STRING).

 

 

 

 

 

At runtime, you can use ui methods to find out and change the property value (so as to make the input text visible or masked):

 

LET var = ui.ListBx.ForName("id")

CALL var.setEnableMultiSelection(...)

DISPLAY var.getEnableMultiSelection()

 

4gl code sample

MAIN

DEFINE f1, f2, dspl STRING,

       lbx ui.ListBox

...

LET lbx = ui.ListBox.Forname("f1")

...

  COMMAND "show"

    LET dspl = "enableMultiSelection=", lbx.getEnableMultiSelection()

    DISPLAY dspl TO f2

  COMMAND "change"

    CALL lbx.setEnableMultiSelection(1)

    LET dspl = "enableMultiSelection=", lbx.getEnableMultiSelection()

    DISPLAY dspl TO f2

...

END MAIN

 

runtime behavior

 

The example above were taken from the example program.

 

 

Example programs:

CVS server: client.querix.com

CVS repository: /lycia_doc_examples

User: client

Project: form_properties

Program: enableMultiSelection

 

Related articles:

invisibleValue