AddString Method

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:09

Description

Add an entry for the string value.

Syntax

object.AddString(strLabel, strValue)

object

Required. Object name, returned by set Dim idlg As InputDlg = New InputDlg.

strLabel

Label as it appears in the dialog. If there's a leading #, the string editor is multiline, otherwise, single line.

strValue

Initial value

Example

Single-line string input:

Dim idlg As InputDlg = New InputDlg

idlg.Title = "My title"

Dim iNum = idlg.AddString("My String", "abcd")  ' add string field, label = "My String", initial value = "abcd"

                                                ' and return the field index in iNum variable

If idlg.ShowDialog Then                         ' if OK was clicked...

  MsgBox(idlg.GetItemValue(iNum))               ' return the value of field with index iNum

End If

 

 

See also

AddDateTime, AddInt, AddCombo, AddSwitch, ComboAddItem

GetItemValue