Click here to Skip to main content
15,913,587 members
Home / Discussions / C#
   

C#

 
AnswerRe: Binary Searlization On Dot Net Webservice Pin
N a v a n e e t h21-Dec-08 17:00
N a v a n e e t h21-Dec-08 17:00 
AnswerRe: Binary Searlization On Dot Net Webservice Pin
Brij21-Dec-08 17:16
mentorBrij21-Dec-08 17:16 
Questionxml - repeated values Pin
arkiboys21-Dec-08 11:46
arkiboys21-Dec-08 11:46 
AnswerRe: xml - repeated values Pin
Christian Graus21-Dec-08 11:49
protectorChristian Graus21-Dec-08 11:49 
GeneralRe: xml - repeated values Pin
arkiboys21-Dec-08 21:29
arkiboys21-Dec-08 21:29 
GeneralRe: xml - repeated values Pin
Christian Graus21-Dec-08 22:52
protectorChristian Graus21-Dec-08 22:52 
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
professional#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 

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.