![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 2
Rep Power: 0
![]() |
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! Last edited by awdboxer; Jun 20th, 2005 at 3:33 PM. |
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
There are rules against helping with homework. I'll point you in the right direction.
MSDN for ListView
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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")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. |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jun 2005
Posts: 2
Rep Power: 0
![]() |
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.
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|