Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
GeneralRe: xml - repeated values Pin
arkiboys21-Dec-08 23:20
arkiboys21-Dec-08 23:20 
QuestionCreating Custom Windows Form Pin
mailtorakib21-Dec-08 9:21
mailtorakib21-Dec-08 9:21 
AnswerRe: Creating Custom Windows Form Pin
Christian Graus21-Dec-08 11:23
protectorChristian Graus21-Dec-08 11:23 
QuestionC# GUI Look Pin
willpv221-Dec-08 9:11
willpv221-Dec-08 9:11 
AnswerRe: C# GUI Look Pin
Christian Graus21-Dec-08 9:19
protectorChristian Graus21-Dec-08 9:19 
GeneralRe: C# GUI Look Pin
willpv221-Dec-08 9:22
willpv221-Dec-08 9:22 
GeneralRe: C# GUI Look Pin
Christian Graus21-Dec-08 11:22
protectorChristian Graus21-Dec-08 11:22 
Questionadding lables to ListBox Pin
Sabry190521-Dec-08 6:44
Sabry190521-Dec-08 6:44 
Hello All
i am trying to add label controls into a listbox control in the runtime
i am using this code

private void button1_Click(object sender, EventArgs e)
{
Label l = new Label();
l.AutoSize = true;
l.Font=listBox1.Font;
Random R=new Random();
int r=R.Next(0,255);
int g=R.Next(0,255);
int b=R.Next(0,255);
l.ForeColor = Color.FromArgb(r, g, b);
l.TextAlign = ContentAlignment.MiddleCenter;
l.Text = "Experement";
listBox1.Items.Add(l);
label1.Text = listBox1.Items.Count.ToString();
listBox1.Invalidate();
}

i think it have no problems, but i cant see anything added to the listbox items.
any help?
AnswerRe: adding lables to ListBox Pin
Dave Kreskowiak21-Dec-08 7:08
mveDave Kreskowiak21-Dec-08 7:08 
AnswerRe: adding lables to ListBox Pin
#realJSOP21-Dec-08 8:03
mve#realJSOP21-Dec-08 8:03 
AnswerRe: adding lables to ListBox Pin
Christian Graus21-Dec-08 9:00
protectorChristian Graus21-Dec-08 9:00 
AnswerRe: adding lables to ListBox Pin
_Maxxx_21-Dec-08 16:28
professional_Maxxx_21-Dec-08 16:28 
GeneralRe: adding lables to ListBox Pin
Dave Kreskowiak21-Dec-08 16:41
mveDave Kreskowiak21-Dec-08 16:41 
GeneralRe: adding lables to ListBox Pin
_Maxxx_21-Dec-08 17:44
professional_Maxxx_21-Dec-08 17:44 
GeneralRe: adding lables to ListBox Pin
danzar21-Dec-08 18:36
danzar21-Dec-08 18:36 
QuestionChange product output path Pin
Ronenb21-Dec-08 4:59
Ronenb21-Dec-08 4:59 
AnswerRe: Change product output path Pin
dan!sh 21-Dec-08 5:35
professional dan!sh 21-Dec-08 5:35 
GeneralRe: Change product output path Pin
Ronenb21-Dec-08 5:56
Ronenb21-Dec-08 5:56 
Question<Module> etc. Pin
Lev Danielyan21-Dec-08 2:50
Lev Danielyan21-Dec-08 2:50 
AnswerRe: <Module> etc. Pin
Not Active21-Dec-08 6:34
mentorNot Active21-Dec-08 6:34 
GeneralRe: <Module> etc. Pin
Lev Danielyan21-Dec-08 6:53
Lev Danielyan21-Dec-08 6:53 
QuestionPreprocessor directives Pin
Deresen21-Dec-08 2:19
Deresen21-Dec-08 2:19 
AnswerRe: Preprocessor directives Pin
User 665821-Dec-08 2:23
User 665821-Dec-08 2:23 
GeneralRe: Preprocessor directives Pin
Deresen21-Dec-08 2:28
Deresen21-Dec-08 2:28 
AnswerRe: Preprocessor directives Pin
#realJSOP21-Dec-08 3:05
mve#realJSOP21-Dec-08 3:05 

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.