AddList Method

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

Description

Ends list box sequence and selects an item with specified index.

It should be called when the items are already added by AddItem. After it is shown, use either GetListIdx to read the index of item selected in the list, or GetListStr to read the name of the item, or GetListData to read the value of the selected item.

Syntax

object.AddList(strLabel, intIdx)

object

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

strLabel

Label as it appears in the dialog.

intIdx

Index of item in the list to be selected when the list is displayed.

Example

Dim idlg As InputDlg = New InputDlg

idlg.Title = My.Resources.IDS_FITTXTPTH

 

Dim combo As InputDlg.Combo = New InputDlg.Combo

combo.AddItem("Above", 0)

combo.AddItem("Below", 1)

Dim po = idlg.AddCombo("Position", combo, SystemUserOptions.TTP_Pos)

Dim di = idlg.AddInt("Distance (in pt)", SystemUserOptions.TTP_Dist)

Dim sp = idlg.AddSwitch("Spread", "Enabled", SystemUserOptions.TTP_Spread)

Dim de = idlg.AddSwitch("Delete", "Enabled", SystemUserOptions.TTP_Del)

 

If idlg.ShowDialog() Then

  SystemUserOptions.TTP_Pos = idlg.GetComboData(po)

  SystemUserOptions.TTP_Dist = idlg.GetItemValue(di)

  SystemUserOptions.TTP_Spread = idlg.GetItemValue(sp)

  SystemUserOptions.TTP_Del = idlg.GetItemValue(de)

  DoTxtToPath(SystemUserOptions.TTP_Pos, SystemUserOptions.TTP_Dist, SystemUserOptions.TTP_Spread, SystemUserOptions.TTP_Del)

End If

See also

AddDateTime, AddInt, AddString, AddSwitch

ComboAddItem, Show