Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 20th, 2005, 1:27 PM   #1
awdboxer
Newbie
 
Join Date: Jun 2005
Posts: 2
Rep Power: 0 awdboxer is on a distinguished road
creating a multiplication table in a ListView control

I'm trying to create this multiplication table for one of my assignments but I can't quite get it working and hoping someone can help. Basically what the program has to do is create a complete set of multiplication tables where both the multiplicand and multiplier vary from 1 through 12 and the table should display as 144 rows in a ListView control.

Here is what I have so far and I attached a pic of what the final result should look like.

Dim x, y As Integer

For x = 1 To 12
For y = 1 To 12
Console.WriteLine("{0} * {1} = {2}", x, y, x * y)
Next
Next

I had some help and found out an easier way to write it but how would I get it to write to the listview instead of the console? I'm a VB noob so any help is greatly appreciated!
Attached Images
File Type: jpg multi.JPG (18.6 KB, 36 views)

Last edited by awdboxer; Jun 20th, 2005 at 3:33 PM.
awdboxer is offline   Reply With Quote
Old Jun 20th, 2005, 4:24 PM   #2
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
There are rules against helping with homework. I'll point you in the right direction.

MSDN for ListView
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Jun 20th, 2005, 5:07 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
OK... that's just mean. I won't do your homework for you, for obvious reasons, but I'll try and be a little more helpful than the complexitiness that is MSDN.

To add a row to a ListView, you use the Items.Add submethod:
Dim LVI As ListViewItem
LVI = ListView1.Items.Add ("Blah")
The ID of the row, as such, is stored in the variable LVI.

To add subitems (same row, new column), it's very similar:
LVI.SubItems.Add ("Moo")

That should be enough to get you going. Remember, you can use the ToString method to convert almost anything to a string for use in the above methods.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 20th, 2005, 7:18 PM   #4
awdboxer
Newbie
 
Join Date: Jun 2005
Posts: 2
Rep Power: 0 awdboxer is on a distinguished road
I wasn't asking anyone to do my hw, just a little help...if that's against the "rules" then my bad. Thanks for the tips Ooble, I got it all working.
awdboxer is offline   Reply With Quote
Old Jun 21st, 2005, 2:59 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Good to hear it.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:51 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC