我正在写一个分析器,它显示了一个特定的程序。有些包的所有包都非常大和列表视图只显示第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