I use it in a MDIChild form ............

  • Thread starter Thread starter Supra
  • Start date Start date
S

Supra

I use it in a MDIChild form, it displays nothing!

how do i string into subitems. i have 3 headers ..................that
fine......... i am doing irc chat similar to mirc. it is list command
from server sending list.
i know how to do pasrse lists................that fine.

Amsterdam.NL.EU.undernet.org 322 djanjo #luv_me_luv_u 1 :Love is in the
air! ! !
Amsterdam.NL.EU.undernet.org 322 djanjo #wetv 1 :GEDZAC
Amsterdam.NL.EU.undernet.org 322 djanjo #CIass 1 :Undernet User-Com's
#Class Project ||| /msg Teacher timeclass |||
www.user-com.undernet.org/class Enjoy :)'


in class project:
Case "322" 'Lists
Dim frml As New frmLvwLists
frml.AddLists(C(3), C(4), C(5))
Debug.WriteLine("list : " & C(3) & " " & C(4) & "
" & C(5))

if form project:
Public Sub AddLists(ByVal szChannel As String, ByVal szUsers As String,
ByVal szTopic As String)

Dim lvi As ListViewItem = lvwList.Items.Add(szChannel)
lvi.SubItems.Add(szUsers)
lvi.SubItems.Add(szTopic)
Debug.WriteLine("AddList :" & szChannel & " " & szUsers & " " &
szTopic) ===> i can see in debug. how do i get string into
listview.subitems?

regards,?
end sub
 
Hi,


Try this.

Dim lvi As new ListViewItem(szChannel)
lvi.SubItems.Add(szUsers)
lvi.SubItems.Add(szTopic)
lvwList.Items.Add(lvi)


Ken

--------------------------
I use it in a MDIChild form, it displays nothing!

how do i string into subitems. i have 3 headers ..................that
fine......... i am doing irc chat similar to mirc. it is list command
from server sending list.
i know how to do pasrse lists................that fine.

Amsterdam.NL.EU.undernet.org 322 djanjo #luv_me_luv_u 1 :Love is in the
air! ! !
Amsterdam.NL.EU.undernet.org 322 djanjo #wetv 1 :GEDZAC
Amsterdam.NL.EU.undernet.org 322 djanjo #CIass 1 :Undernet User-Com's
#Class Project ||| /msg Teacher timeclass |||
www.user-com.undernet.org/class Enjoy :)'


in class project:
Case "322" 'Lists
Dim frml As New frmLvwLists
frml.AddLists(C(3), C(4), C(5))
Debug.WriteLine("list : " & C(3) & " " & C(4) & "
" & C(5))

if form project:
Public Sub AddLists(ByVal szChannel As String, ByVal szUsers As String,
ByVal szTopic As String)

Dim lvi As ListViewItem = lvwList.Items.Add(szChannel)
lvi.SubItems.Add(szUsers)
lvi.SubItems.Add(szTopic)
Debug.WriteLine("AddList :" & szChannel & " " & szUsers & " " &
szTopic) ===> i can see in debug. how do i get string into
listview.subitems?

regards,?
end sub
 
hi ken,
i tried this code all times , but nothing display in subitems.. i have
read book by francesco balena from miscrosft press book. i tried to
following his example. and also doing googles search too. as u c i
have 4 mdichilds ...status, channel, dccchat, private chat similar to
mirc and pirch.
ne ideas u can help me?
regards,
 
Hi,

Stupid question but did you add columns to the listview and set the
view to details?

ListView1.Columns.Add("Column 1", 300, HorizontalAlignment.Left)

ListView1.Columns.Add("Column 2", 200, HorizontalAlignment.Left)

ListView1.Columns.Add("Column 3", 100, HorizontalAlignment.Left)

ListView1.View = View.Details



Ken

------------------------

hi ken,
i tried this code all times , but nothing display in subitems.. i have
read book by francesco balena from miscrosft press book. i tried to
following his example. and also doing googles search too. as u c i
have 4 mdichilds ...status, channel, dccchat, private chat similar to
mirc and pirch.
ne ideas u can help me?
regards,
 
yes. I did added and put in sub new() procedure
this is what i done b4.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

lvwList.Columns.Add("Channels", 100, HorizontalAlignment.Left)
lvwList.Columns.Add("Users", 50, HorizontalAlignment.Center)
lvwList.Columns.Add("Topic", 500, HorizontalAlignment.Left)
End Sub

Now problem is nothing display in subitems.

regards
 
yes. I did added and put in sub new() procedure
this is what i done b4.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

lvwList.Columns.Add("Channels", 100, HorizontalAlignment.Left)
lvwList.Columns.Add("Users", 50, HorizontalAlignment.Center)
lvwList.Columns.Add("Topic", 500, HorizontalAlignment.Left)
End Sub

Now problem is nothing display in subitems.

Okay, this shows that you added the columns, but did you definitely switch
the view to Details?
 
Yes. I did in listview property window set from view to detail.
the only thing is u can see in debug szChannel, scUsers and szTopic in
addlist procedure. but y is that is not displaying in subitems.
regards
 
Yes. I did in listview property window set from view to detail.
the only thing is u can see in debug szChannel, scUsers and szTopic in
addlist procedure. but y is that is not displaying in subitems.
regards

Do you see the column headers in the list view when you run the program? Is
there any possibility that somewhere else in the code something is setting
the view to List or anything besides Details?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top