You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WindowsForms/ComboBox/Token.md
+57-56Lines changed: 57 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,129 +65,130 @@ sfComboBox1.Style.TokenStyle.Font = New Font(“Arial”, 10F, FontStyle.Bold)
65
65
66
66
## Events Fired When Selecting and Deselecting Tokens
67
67
68
-
The events [SelectedValueChanged](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfComboBox.html#Syncfusion_WinForms_ListView_SfComboBox_SelectedValueChanged) and [SelectedIndexChanged](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfComboBox.html#Syncfusion_WinForms_ListView_SfComboBox_SelectedIndexChanged) are triggered when tokens are selected or deselected in the SfComboBox control.
68
+
The events [SelectedValueChanged](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfComboBox.html#Syncfusion_WinForms_ListView_SfComboBox_SelectedValueChanged)event is triggered when tokens are selected or deselected in the SfComboBox control.
69
69
70
70
{% tabs %}
71
71
{% highlight c# %}
72
72
73
-
private List<object> _previousSelectedTokens;
73
+
private List<object> _previousSelectedTokens;
74
+
private Label label;
75
+
74
76
SfComboBox sfComboBox1 = new SfComboBox
75
77
{
76
-
EnableToken = true,
77
-
DisplayMember = "Name",
78
-
ValueMember = "Id",
79
-
};
80
-
// Set the DataSource
81
-
sfComboBox1.DataSource = new List<dynamic>
82
-
{
78
+
EnableToken = true,
79
+
DisplayMember = "Name",
80
+
ValueMember = "Id",
81
+
Size = new Size(300, 30),
82
+
DataSource = new List<dynamic>
83
+
{
83
84
new { Id = 1, Name = "Item1" },
84
85
new { Id = 2, Name = "Item2" },
85
86
new { Id = 3, Name = "Item3" }
87
+
}
88
+
};
89
+
90
+
sfComboBox1.Style.TokenStyle.Font = new Font("Arial", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
0 commit comments