Click here to Skip to main content
16,006,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: Push Server architecture Pin
leppie29-Oct-05 22:38
leppie29-Oct-05 22:38 
GeneralRe: Push Server architecture Pin
rmedo29-Oct-05 22:39
rmedo29-Oct-05 22:39 
GeneralRe: Push Server architecture Pin
Robert Rohde29-Oct-05 22:57
Robert Rohde29-Oct-05 22:57 
GeneralRe: Push Server architecture Pin
leppie29-Oct-05 23:01
leppie29-Oct-05 23:01 
QuestionListBox Pin
picasso229-Oct-05 19:19
picasso229-Oct-05 19:19 
AnswerRe: ListBox Pin
Matt Gerrans29-Oct-05 19:41
Matt Gerrans29-Oct-05 19:41 
AnswerRe: ListBox Pin
MoustafaS29-Oct-05 19:02
MoustafaS29-Oct-05 19:02 
GeneralRe: ListBox Pin
picasso229-Oct-05 19:51
picasso229-Oct-05 19:51 
The code works fine if I create the components via VS.NET but I cannot get it to work when I create the controls dynamically. I am sure an item is selected because it gets highlighted.

Here is the way I am doing it
\\code for button to create components
ListBox lB1 = new ListBox();
lB1.Location = new Point(8,24);
lB1.Items.Add("A");
lB1.Items.Add("B");
lB1.Items.Add("C");
ListBox lB2 = new ListBox();
lB2.Location = new Point(8,24);
\\button
Button btn1 = new Button();
btn1.Location = new Point(152,30);
btn1.Text="->";
btn1.Size = new System.Drawing.Size(40,23);
btn1.Click += new System.EventHandler(btn1_Click);
\\when bnt1 clicked
private void btn1_Click(object sender, System.EventArgs e)
{
string curItem = listBox1.SelectedItem.ToString();
listBox2.Items.Add(curItem);
}


GeneralRe: ListBox Pin
mav.northwind29-Oct-05 20:03
mav.northwind29-Oct-05 20:03 
AnswerRe: ListBox Pin
MoustafaS29-Oct-05 20:08
MoustafaS29-Oct-05 20:08 
GeneralRe: ListBox Pin
picasso230-Oct-05 8:27
picasso230-Oct-05 8:27 
AnswerRe: ListBox Pin
MoustafaS30-Oct-05 8:57
MoustafaS30-Oct-05 8:57 
GeneralRe: ListBox Pin
picasso230-Oct-05 10:54
picasso230-Oct-05 10:54 
GeneralRe: ListBox Pin
Rob Graham30-Oct-05 15:08
Rob Graham30-Oct-05 15:08 
QuestionExtending/Duplicating a Form Pin
Nkdnt29-Oct-05 17:32
Nkdnt29-Oct-05 17:32 
AnswerRe: Extending/Duplicating a Form Pin
S. Senthil Kumar29-Oct-05 19:12
S. Senthil Kumar29-Oct-05 19:12 
QuestionRe: Extending/Duplicating a Form Pin
MoustafaS29-Oct-05 19:36
MoustafaS29-Oct-05 19:36 
AnswerRe: Extending/Duplicating a Form Pin
Robert Rohde29-Oct-05 22:33
Robert Rohde29-Oct-05 22:33 
GeneralRe: Extending/Duplicating a Form Pin
MoustafaS30-Oct-05 16:27
MoustafaS30-Oct-05 16:27 
QuestionHow can I get info about which MenuItem that is clicked at runtime? Pin
M Shafaat29-Oct-05 14:11
M Shafaat29-Oct-05 14:11 
AnswerRe: How can I get info about which MenuItem that is clicked at runtime? Pin
Sean Michael Murphy29-Oct-05 16:23
Sean Michael Murphy29-Oct-05 16:23 
GeneralRe: How can I get info about which MenuItem that is clicked at runtime? Pin
Robert Rohde29-Oct-05 22:37
Robert Rohde29-Oct-05 22:37 
GeneralRe: How can I get info about which MenuItem that is clicked at runtime? Pin
M Shafaat30-Oct-05 8:35
M Shafaat30-Oct-05 8:35 
QuestionmciSendString and fullscreen Pin
Sasuko29-Oct-05 13:47
Sasuko29-Oct-05 13:47 
QuestionStrange Behaviour of an Object Pin
1nsp1r3d29-Oct-05 13:24
1nsp1r3d29-Oct-05 13:24 

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.