功能区组合框在重新加载时丢失值

时间:2019-07-16 20:20:43

标签: vb.net

对象是为新约会创建一个组合框。组合框显示课程名称列表。问题是当我加载新约会时,组合框会显示课程名称列表,但是一旦我创建了另一个课程(约会)组合框,便不会显示该列表。


代码:

    If Globals.Ribbons.Ribbon1.ComboBox1.Items.Count = 0 Then
         For Each cell In exlWorkSheet.Range(exlWorkSheet.Cells(2, 1), exlWorkSheet.Cells(nombreLigne, 1))
            item1 = Me.Factory.CreateRibbonDropDownItem()
            item1.Label = (CType(cell.value, String)) 'Appel au méthode
            Globals.Ribbons.Ribbon1.ComboBox1.Items.Add(item1)
            Diagnostics.Trace.WriteLine("Items : " & item1.ToString)
            Diagnostics.Trace.WriteLine("ComboBox : " & Globals.Ribbons.Ribbon1.ComboBox1.Items.ToString)
        Next
        ComboBox1.Dispose()

    End If

0 个答案:

没有答案
相关问题