How do I make a ListBox refresh its item text?

前端 未结 10 1978
后悔当初
后悔当初 2020-12-03 04:42

I\'m making an example for someone who hasn\'t yet realized that controls like ListBox don\'t have to contain strings; he had been storing formatted strings and

10条回答
  •  旧巷少年郎
    2020-12-03 05:11

    typeof(ListBox).InvokeMember("RefreshItems", 
      BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod,
      null, myListBox, new object[] { });
    

提交回复
热议问题