listview subitem

  • Thread starter Thread starter Jano
  • Start date Start date
J

Jano

Hello.
I have one question
I make Listview with 4 columns.
And I want add text to to column 2,3,4.
With listview1->Items->add ("Text") I can add text only to first column.
In Visual basic.NEt I can write listview1.Items(x).Subitem(number
column).Add ("Text"). Is something like this in VC.NET?
Thanks for answers.
 
I have one question
I make Listview with 4 columns.
And I want add text to to column 2,3,4.
With listview1->Items->add ("Text") I can add text only to first column.
In Visual basic.NEt I can write listview1.Items(x).Subitem(number
column).Add ("Text"). Is something like this in VC.NET?

If you're working in managed C++ with WinForms it'll be essentially
the same.

If you're using native SDK you use the LVM_SETITEMTEXT message,
similarly for MFC you use the CListCtrl::SetItemText method.

Dave
 
But it's not the same, How can I add Subitem?

What's not the same?

You need to explain your situation and problem more.

Dave
 
OK. I can add subItem to listview, in listview I Have 3 columns.
In first column will be Name, in second colun will be Surname, And in three
column will be Address.
How can I add : Peter~ Blank~ Main street 22
Thanks
 
I repair my previous Post.
How can add Item with 2 subitems to listview, in listview I Have 3 columns.
In first column will be Name, in second column will be Surname, And in third
column will be Address.
How can I add : Peter (Name)~ Blank(Surname)~ Main street 22(Adress) to
Thanks

In visual basic.net I can Write
Listview1.Items(1).Subitems.add("Peter")
Listview1.Items(1).Subitems.add("Blank")
Listview1.Items(1).Subitems.add("Adress")

And When I want get Text of Item in second row and second Column
I can write Listview.Items(1).Subitems(1).Text.

How Can I write this 2 things in Visual C++.NEt in Managed Application.


BEcaause I couldn't write Listview1->Items(1)->
Thanks.
 
In visual basic.net I can Write
Listview1.Items(1).Subitems.add("Peter")
Listview1.Items(1).Subitems.add("Blank")
Listview1.Items(1).Subitems.add("Adress")

And When I want get Text of Item in second row and second Column
I can write Listview.Items(1).Subitems(1).Text.

How Can I write this 2 things in Visual C++.NEt in Managed Application.


BEcaause I couldn't write Listview1->Items(1)->

It'll be something like:

Listview1->Items[1]->Subitems->add("Adress")

Dave
 
Back
Top