我正在寫一個分析器,它顯示了一個特定的程序。有些包的所有包都非常大和列表視圖只顯示第15-20個字符:\如何將大文本添加到listview的(詳細)項目?
這是我的代碼
string __str = String.Join(" ", data.Select(x => x.ToString("x2")).ToArray()); //covert the byte[](packet) to hex string
string __ascii = AsciiToString(data); //convert the byte[](packet) to ASCII
if (encrypted) FormMain.PFA(form => form.listViewAnalyzer.Items.Add("S<-C [ENCRYPTED] Blowfishkey = 0xFF"));
else FormMain.PFA(form => form.listViewAnalyzer.Items.Add("S<-C"));
ListViewItem item = new ListViewItem(__str); //create new item and place the packet as hex string
item.SubItems.Add(__ascii); //add the ascii variant as substring
FormMain.PFA(form => form.listViewAnalyzer.Items.Add(item)); //add the item
它必須是禁止添加超過x行的文本的屬性,但我看不到它。
我不能讓它更廣泛,包長度是600字節。所以我不能那樣做? – 2009-05-02 07:36:34
如果文章太長而不適合在列中,您希望做什麼? – 2009-05-02 07:40:02
我想使它成爲多行。如果需要,它可以放在兩行(項目) – 2009-05-02 07:43:59