AddColorCombo Method (InputDlg)

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

Description

Display the list of colors and returns the category if (if single selection), or a list of category ids (if multiselection).

Syntax

dlg.AddCategoryBrowserdlg.AddCategoryBrowser(sLabel, comboid, pos)

dlg

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

sLabel

Side label (to make sure the label will fit, set the appropriate dialog width (dlg.Width = value), and the label width.

comboid

id the the combobox, e.g. created by Dim combo As InputDlg.ColorComboBox = new InputDlg.ColorComboBox().

pos

Index of the initial position

Example

Dim dlg As New TeraDp.GN4.WinUI.InputDlg()
dlg.Title = "Test"
dlg.Width = 500
dlg.SetLabelWidth(250)
 
dlg.AddCategoryBrowser("Categories", "MainCategories", false, 200)
 
Dim combo As InputDlg.ColorComboBox = new InputDlg.ColorComboBox()
UtilsBase.InputDlgFillColorCombo(combo, TedApp.GetCurTypographyId())
dlg.AddColorCombo("Colors", combo, 0)
 
Dim comboBox As System.Windows.Controls.ComboBox = new System.Windows.Controls.ComboBox()
UtilsBase.InputDlgFillDashesCombo(comboBox, TedApp.GetCurTypographyId())
Dim dIdx As Integer = dlg.AddGenericCombo("Dashes", comboBox, 0)
 
dlg.AddMeasure("Measure", 152)
dlg.ShowDialog()
 
Dim dash As TeraDP.GN4.Editorial.DashDesc = dlg.GetGenericComboValue(dIdx)