Promotic
WikipediaLinkedInYoutubeTwitterFacebook

InputBoxForStringSelection - method of the Pm object

Description:
It allows to select the string from the list in the input window (or more substrings if the &H200 style is set).
This method is obsolete (but functional) and it is better to use the Pm.CreateView method - see Opening the viewer for option selection (/#glob/list).
Syntax:
Boolean InputBoxForStringSelection(String sDlgTitle, Long nStyle, Variant vValue, Variant vStrings)
Parameters:
sDlgTitle(String) Title of the input window
nStyle(Long) Bit flags defining window type and content.
Hexadecimal numbers can be entered by adding a prefix: for JavaScript it is 0x and for VBScript it is &H. For example, 0x10 or &H10 in hexadecimal represents 16 in decimal.
It is possible to enter the following styles or their combinations as a sum:
&H100 - String are sorted out in the list
&H200 - It is possible to select multiple strings from the list
&H20000 - Return the selected value as the index from the list
&H10000000 - Window will be displayed on up of all windows
vValue[for read and write] (Variant)
on the calling: the default value for the selection from the list (number or text string).
after the calling: the selected value
vStrings(Variant) String array making the list. See the example.
Return values:
true - If the window has been closed by the "OK" button.
false - If the window has been closed by the "Cancel" button.
Note:
This method is not functional in Web panels.
Example1:
Selection of one string from the list:
VBScriptSelect and copy to clipboard

Dim Value, Strings
Value = "second"
Strings = Array("first", "second", "third")
If Pm.InputBoxForStringSelection("Select string", 0, Value, Strings) Then
'... The text string selected OK
Pm.Debug Value
End If
Example2:
Selection of multiple strings from the list, in addition values returned as indexes to the list
VBScriptSelect and copy to clipboard

Dim i, Value, Strings
Value = Array("second", "third")
Strings = Array("first", "second", "third")
If Pm.InputBoxForStringSelection("Select string", &H200 + &H20000, Value, Strings) Then
'... The text string selected OK
For i = 0 To UBound(Value) + 1 - 1
Pm.Debug Value(i)
Next
End If
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- InputBoxForStringSelection
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice