Click here to Skip to main content
15,893,508 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataGrid Icons and Images Pin
Robert Rohde7-May-06 20:16
Robert Rohde7-May-06 20:16 
GeneralRe: DataGrid Icons and Images Pin
Muecahit Goeksu8-May-06 10:11
Muecahit Goeksu8-May-06 10:11 
GeneralRe: DataGrid Icons and Images Pin
Robert Rohde8-May-06 12:57
Robert Rohde8-May-06 12:57 
QuestionWriting values from ArrayList into a text box Pin
Rizwan Rathore7-May-06 7:53
Rizwan Rathore7-May-06 7:53 
AnswerRe: Writing values from ArrayList into a text box Pin
Sean897-May-06 8:04
Sean897-May-06 8:04 
GeneralRe: Writing values from ArrayList into a text box Pin
Rizwan Rathore7-May-06 8:16
Rizwan Rathore7-May-06 8:16 
GeneralRe: Writing values from ArrayList into a text box Pin
Larantz7-May-06 8:28
Larantz7-May-06 8:28 
GeneralRe: Writing values from ArrayList into a text box Pin
Larantz7-May-06 8:20
Larantz7-May-06 8:20 
I would recommend listbox aswell because a listbox is dynamic, so if your ArrayList containts 10 or 100 items, it won't matter. A textbox will be filled up and you'd have to resize it manually to fit the contents.

ListBox foo = new ListBox();
ArrayList bar = new ArrayList();

fillArrayList(bar);

foreach(object obj in bar)
   foo.Items.Add(obj);


If you know the objecttype in the ArrayList you can cast it like: "foo.Items.Add((myObject)obj);"
But unless the object has a ToString() method that produces something intelligent, the text added to your textbox will only be the type of the object. Like if you added a custom object called myObject, thats within the namespace myNamespace, the text you'd see in the listbox pr item would be "myNamespace.myObject". Smile | :)

If the ArrayList is filled with string-items you could use "foo.Items.Add(obj.ToString());"

-Larantz-
GeneralRe: Writing values from ArrayList into a text box Pin
Rizwan Rathore7-May-06 10:23
Rizwan Rathore7-May-06 10:23 
GeneralRe: Writing values from ArrayList into a text box Pin
Rizwan Rathore7-May-06 23:29
Rizwan Rathore7-May-06 23:29 
GeneralRe: Writing values from ArrayList into a text box Pin
J4amieC7-May-06 23:42
J4amieC7-May-06 23:42 
GeneralRe: Writing values from ArrayList into a text box Pin
Rizwan Rathore7-May-06 23:54
Rizwan Rathore7-May-06 23:54 
QuestionListView.Items.ContainsKey ?? Pin
student_rhr7-May-06 7:09
student_rhr7-May-06 7:09 
AnswerRe: ListView.Items.ContainsKey ?? Pin
Larantz7-May-06 8:32
Larantz7-May-06 8:32 
GeneralRe: ListView.Items.ContainsKey ?? Pin
student_rhr7-May-06 10:08
student_rhr7-May-06 10:08 
QuestionReflection Problem ! Pin
User 20930737-May-06 6:35
User 20930737-May-06 6:35 
AnswerRe: Reflection Problem ! Pin
rudy.net7-May-06 7:23
rudy.net7-May-06 7:23 
GeneralRe: Reflection Problem ! Pin
User 20930737-May-06 18:26
User 20930737-May-06 18:26 
AnswerRe: Reflection Problem ! Pin
Stefan Troschuetz7-May-06 7:32
Stefan Troschuetz7-May-06 7:32 
GeneralRe: Reflection Problem ! Pin
S. Senthil Kumar7-May-06 7:39
S. Senthil Kumar7-May-06 7:39 
GeneralRe: Reflection Problem ! Pin
Stefan Troschuetz7-May-06 8:12
Stefan Troschuetz7-May-06 8:12 
AnswerRe: Reflection Problem ! Pin
S. Senthil Kumar7-May-06 7:36
S. Senthil Kumar7-May-06 7:36 
GeneralRe: Reflection Problem ! Pin
User 20930737-May-06 20:55
User 20930737-May-06 20:55 
Questioninsert into error Pin
Susuko7-May-06 5:52
Susuko7-May-06 5:52 
AnswerRe: insert into error Pin
Shajeel7-May-06 22:06
Shajeel7-May-06 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.