如何从列表视图中读取文本(字符串)值并显示它 [英] How do I read the text(string) values from a listviewbox and display it
问题描述
嗨......我是c ++世界的新手,即时创建一个带有listview的c ++ CLI表单,在运行时在Load事件中填充...现在我到目前为止当我双击listview项目时,列表能够显示一个消息框...但继承人我的问题....
我如何获得消息框显示所选项目的文本和子项...
like
Hi... I'm new in the world of c++, im creating a c++ CLI form with a listview on which is populated at runtime in the "Load" event... now i hav come so far as to make the list able to show a message box when i double click the listview item...but heres my question....
How do i get the message box to display the selected items text and subitems...
like
String^ MystringtoUSE;
MystringtoUSE = "Item Clicked: " + "(here's the first item in the list)" + " - Total Files: " + "(now the subitem text)");
MessageBox::Show (MystringtoUSE,"Double Clicked");
i不知道该怎么做...
有人可以请帮忙我......我需要解决这个问题......教我未来...
我尝试过的事情:
*在线搜索,但他们真的很有帮助。
* MyList-> GetItemAt(0,0)//项目
MyList->子项目的GetItemAt(0,1)
* MyList-> GetItemAt(0,0) - > text
i dont know what to do...
can someone please help me....i need to fix this....teach me for the future...
What I have tried:
*searching online but they really help.
*MyList->GetItemAt(0,0) //for the items
MyList->GetItemAt(0, 1) for subitem
*MyList->GetItemAt(0,0)->text
推荐答案
请参阅 ListView.SelectedItems属性(System.Windows.Forms) [ ^ ]。
这篇关于如何从列表视图中读取文本(字符串)值并显示它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!