Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB.NET] ListView; Adding items to specific columns

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Tue Nov 13, 2007 10:26 pm    Post subject: [VB.NET] ListView; Adding items to specific columns Reply with quote

I can't seem to figure out how to add items to specific columns in the ListView control.
Couldn't find any good examples on google, either.

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Tue Nov 13, 2007 10:56 pm    Post subject: Reply with quote

Say you have three columns. To add a row you would do this
Code:

listView1.Items.Add("Insert something here");
// second column
listView1.Items[row#].SubItems.Add("Insert something here");
// third column
listView1.Items[row#].SubItems.Add("Insert something here");


This will fill it up so it would look something like this

Column A | Column B | Column C |
____________________________
Insert something here | Insert something here| Insert something here|

Edit:
You can edit the value for a SubItem by doing this
Code:

listView1.Items[row#].SubItems[subitem index].Text = "Something";


Last edited by killersamurai on Tue Nov 13, 2007 11:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Tue Nov 13, 2007 11:01 pm    Post subject: Reply with quote

killersamurai wrote:
Say you have three columns. To add a row you would do this
Code:

listView1.Items.Add("Insert something here");
listView1.Items[0].SubItems.Add("Insert something here");
listView1.Items[0].SubItems.Add("Insert something here");


This will fill it up so it would look something like this

Column A | Column B | Column C |
____________________________
Insert something here | Insert something here| Insert something here|

Thanks. Smile
Got it to work with this code...
Code:
        frmEditor.lstVariables.Items.Add(txtVariable.Text)
        frmEditor.lstVariables.Items(frmEditor.lstVariables.Items.Count - 1).SubItems.Add(txtValue.Text)

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites