Any C# Programmers out there?

Man of Honour
Joined
17 Feb 2003
Posts
29,640
Location
Chelmsford
Hi, Pretty new to C# so bear with here.. I'm trying to create a form which shows a list of balances in a listbox.. but I can't find a way of aligning the currency fields in neat columns .. i.e. right justified but aligned with the previous entry.

Any ideas who I can do this or any other way of presenting the list?
 
ah Apparently i can use listview:

Code:
 string[] row1 = { "s1", "s2", "s3" }; 
 listView1.Items.Add("Column1Text").SubItems.AddRange(row1); 
,

However i only stiil getone column..

same here:

Code:
   ListViewItem item1 = new ListViewItem("Something");
            item1.SubItems.Add("SubItem1a");
            item1.SubItems.Add("SubItem1b");
            ListViewItem item2 = new ListViewItem("Something2");
            item2.SubItems.Add("SubItem2a");
            item2.SubItems.Add("SubItem2a");
            ListViewItem item3 = new ListViewItem("Somethin3");
            item3.SubItems.Add("SubItem3a");
            item3.SubItems.Add("SubItem3a");

            listView1.Items.AddRange(new ListViewItem[] { item1, item2, item3 });
 
Last edited:
Hey Stelly,

Gotcha.. Many thanks I just may take you up on that. I attended a course a few weeks ago. The whole Object Orientation thing is a bit alien to me coming from a iSeries background so I'm just toying around at the moment. We are thinking of re-writing some of our systems to use C#/.NET in the near future.
 
Back
Top Bottom