選擇該項目后,我嘗試從組合框中的圖像列表中繪制圖像。我可以繪制圖像,但是當onSelctedIndexChanged事件結束時,我丟失了圖像。我的組合框已經有 DrawMode.OwnerDrawFixed我有一個ListImage名為ImageList的控件,其中包含10張圖片。對于我的小例子我只需要在我的ImageList的1位在我的組合框中繪制圖像,這就是為什么我得到this.ImageList.Draw的原因(G,0,0,1); protected override void OnSelectedIndexChanged(EventArgs e) { base.OnSelectedIndexChanged(e); if (this.SelectedIndex > -1) { var g = this.CreateGraphics(); this.ImageList.Draw(g, 0, 0, 1); } }可能我不重視正確的活動。有什么建議嗎?繪制后,在索引更改中看到下面帶有斷點的圖片框。工作正常,但是活動結束后我失去了形象。
- 1 回答
- 0 關注
- 152 瀏覽
添加回答
舉報
0/150
提交
取消