Click here to Skip to main content
16,017,167 members
Home / Discussions / C#
   

C#

 
QuestionResize Objects with Mouse Pin
ytubis15-May-09 22:56
ytubis15-May-09 22:56 
AnswerRe: Resize Objects with Mouse Pin
dan!sh 16-May-09 0:17
professional dan!sh 16-May-09 0:17 
QuestionCheck if web-frame in webclient is done loading Pin
Member 441789215-May-09 22:17
Member 441789215-May-09 22:17 
Questioncheck open form Pin
michaelgr115-May-09 22:09
michaelgr115-May-09 22:09 
AnswerRe: check open form Pin
Anubhava Dimri15-May-09 22:26
Anubhava Dimri15-May-09 22:26 
AnswerRe: check open form Pin
A.m.a.L15-May-09 22:46
A.m.a.L15-May-09 22:46 
AnswerRe: check open form Pin
dan!sh 16-May-09 0:19
professional dan!sh 16-May-09 0:19 
QuestionHow to use Combo box in C# Pin
dotnetkoders15-May-09 21:00
dotnetkoders15-May-09 21:00 
Hi All,
I have a class Class1. In Class1 constructor I am calling InitializeComponent().Which will be used to add controls to form at runtime. I have one more method Initialize(). In this Initialize() I am filling the value for the combo box.
My problem is the value is not updated in combo box.

Could any one help me to solve this issue.

Code snippet:
<pre>
Public Class1()
{
InitializeComponent();
}
Public void Intialize()
{
string[] employees = new string[]{"Hamilton, David", "Hensien, Kari"};
SampleComboBox.Items.AddRange(employee);
SampleComboBox.SelectedItem=employee[0];
SampleComboBox.SelectedIndexChanged += new System.EventHandler(this.SampleComboBox_SelectedIndexChanged);
}

This code is present in Designer.cs

Private InitializeComponent()
{
this.SampleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.SampleComboBox.DropDownWidth = 97;
this.SampleComboBox.FormattingEnabled = true;
this.SampleComboBox.Location = new System.Drawing.Point(84, 16);
this.SampleComboBox.Name = "SampleComboBox";
this.SampleComboBox.Size = new System.Drawing.Size(91, 21);
this.SampleComboBox.TabIndex = 2;

this.Controls.Add(this.SampleComboBox);
this.Name = "SampleApp";
this.Size = new System.Drawing.Size(190, 51);
this.ResumeLayout(false);
}
private System.Windows.Forms.ComboBox SampleComboBox;
</pre>


Thanks,
Anandi
AnswerRe: How to use Combo box in C# Pin
DaveyM6915-May-09 21:06
professionalDaveyM6915-May-09 21:06 
Questionimportant msg Pin
aadikadain15-May-09 20:19
aadikadain15-May-09 20:19 
AnswerRe: important msg Pin
dan!sh 15-May-09 20:21
professional dan!sh 15-May-09 20:21 
AnswerRe: important msg Pin
A.m.a.L15-May-09 22:50
A.m.a.L15-May-09 22:50 
GeneralRe: important msg Pin
Baeltazor16-May-09 0:47
Baeltazor16-May-09 0:47 
QuestionAssigning value to session in javascript Pin
Indrajeet Sutar15-May-09 20:06
Indrajeet Sutar15-May-09 20:06 
AnswerRe: Assigning value to session in javascript Pin
dan!sh 15-May-09 20:08
professional dan!sh 15-May-09 20:08 
GeneralRe: Assigning value to session in javascript Pin
Indrajeet Sutar15-May-09 20:16
Indrajeet Sutar15-May-09 20:16 
GeneralRe: Assigning value to session in javascript Pin
dan!sh 15-May-09 20:20
professional dan!sh 15-May-09 20:20 
QuestionCreate the context menu at run time Pin
lnmca15-May-09 19:53
lnmca15-May-09 19:53 
AnswerRe: Create the context menu at run time Pin
dan!sh 15-May-09 20:11
professional dan!sh 15-May-09 20:11 
Questionhow to open the file.... Pin
kapilonkar15-May-09 19:48
kapilonkar15-May-09 19:48 
AnswerRe: how to open the file.... Pin
Nuri Ismail15-May-09 21:09
Nuri Ismail15-May-09 21:09 
GeneralRe: how to open the file.... Pin
kapilonkar15-May-09 23:59
kapilonkar15-May-09 23:59 
QuestionHow to blink label in C# Pin
Mads11515-May-09 19:34
Mads11515-May-09 19:34 
AnswerRe: How to blink label in C# Pin
dan!sh 15-May-09 19:49
professional dan!sh 15-May-09 19:49 
GeneralRe: How to blink label in C# Pin
OriginalGriff15-May-09 22:58
mveOriginalGriff15-May-09 22:58 

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.