Page 1 of 1

Halo 2 Header information displaying in ListBox

Posted: Fri Aug 15, 2008 5:44 am
by Eaton
I have a good header class and have successfully made header information appear through labels, but I want to try a list box. I know that it is probably easy, but I just don't know the code to make the information appear in the list box. How can I make it appear?

Posted: Fri Aug 15, 2008 7:05 am
by conure
It is generally helpful to know what programing language you are asking for help in......

Edit: Opps, i missed the reference to header files.

Posted: Fri Aug 15, 2008 7:15 am
by OwnZ joO
With h being your header object and lst being your listbox, I would recommend something along the lines of:

Code: Select all

lst.Items.Add("Header Value: " + h.Value);
...

Posted: Fri Aug 15, 2008 12:58 pm
by Eaton
conure wrote:It is generally helpful to know what programing language you are asking for help in......

Edit: Opps, i missed the reference to header files.
Oops. I am programming in C#.
OwnZ joO wrote:With h being your header object and lst being your listbox, I would recommend something along the lines of:

Code: Select all

lst.Items.Add("Header Value: " + h.Value);
...
Well, that code doesn't seem to be working for me... :x

Posted: Fri Aug 15, 2008 2:09 pm
by grimdoomer
Try this:

Code: Select all

listView1.Items.Add("Name Of Value - " + map.Header.Value.ToString());
[/code]

Posted: Fri Aug 15, 2008 2:39 pm
by Eaton
Thank you Grim! :D Works perfectly.