Click here to Skip to main content
16,009,057 members
Home / Discussions / C#
   

C#

 
QuestionHow to create a waiting screen while the current form process a task? Pin
yossof elnaggar9-Jul-06 4:33
yossof elnaggar9-Jul-06 4:33 
AnswerRe: How to create a waiting screen while the current form process a task? Pin
Andrew Lygin9-Jul-06 5:20
Andrew Lygin9-Jul-06 5:20 
GeneralRe: How to create a waiting screen while the current form process a task? Pin
yossof elnaggar9-Jul-06 21:22
yossof elnaggar9-Jul-06 21:22 
GeneralRe: How to create a waiting screen while the current form process a task? Pin
Andrew Lygin9-Jul-06 22:32
Andrew Lygin9-Jul-06 22:32 
AnswerRe: How to create a waiting screen while the current form process a task? Pin
Nader Elshehabi9-Jul-06 11:02
Nader Elshehabi9-Jul-06 11:02 
AnswerRe: How to create a waiting screen while the current form process a task? Pin
LongRange.Shooter10-Jul-06 8:39
LongRange.Shooter10-Jul-06 8:39 
QuestionCombobox issue Pin
V.9-Jul-06 3:05
professionalV.9-Jul-06 3:05 
AnswerRe: Combobox issue Pin
Nader Elshehabi9-Jul-06 11:28
Nader Elshehabi9-Jul-06 11:28 
Hello

V. wrote:
it always reads an item that is part of the datasource


I've tried your problem, but it didn't happen at all. Here is my code:
-Assume you have comboBox1 and button1 in your form-

public partial class Form1 : Form
    {
        ArrayList arr;

        public Form1()
        {
            InitializeComponent();
            arr = new ArrayList();
            arr.Add("hello");
            arr.Add("World");
            arr.Add("is");
            arr.Add("an");
            arr.Add("old");
            arr.Add("example");
            comboBox1.DataSource = arr;
        }
        
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(comboBox1.Text);
        }
}


When I press button1, it displays the current text just fine. So, where is your problem??


V. wrote:
Can you add items to your datasource?


Data source is dealed with through the IList interface. so you can add items as long as you know the type of your list -strings, numbers, etc...-

eg.
((IList)comboBox1.DataSource).Add(comboBox1.Text);


But don't forget to refresh your ComboBox after adding items to the datasource.

RegardsRose | [Rose]
GeneralRe: Combobox issue Pin
V.9-Jul-06 19:16
professionalV.9-Jul-06 19:16 
GeneralRe: Combobox issue Pin
V.11-Jul-06 1:54
professionalV.11-Jul-06 1:54 
QuestionHow to programming serial port (RS-232) in VC#.net(visual studio.net 2003) with .net framework1.1 Pin
bug_aonz9-Jul-06 0:22
bug_aonz9-Jul-06 0:22 
AnswerRe: How to programming serial port (RS-232) in VC#.net(visual studio.net 2003) with .net framework1.1 Pin
Guffa9-Jul-06 1:27
Guffa9-Jul-06 1:27 
AnswerRe: How to programming serial port (RS-232) in VC#.net(visual studio.net 2003) with .net framework1.1 Pin
Ed.Poore9-Jul-06 12:30
Ed.Poore9-Jul-06 12:30 
QuestionData structure and exception Pin
Super Lloyd8-Jul-06 21:53
Super Lloyd8-Jul-06 21:53 
AnswerRe: Data structure and exception Pin
Andrew Lygin8-Jul-06 22:41
Andrew Lygin8-Jul-06 22:41 
GeneralRe: Data structure and exception Pin
Super Lloyd8-Jul-06 23:49
Super Lloyd8-Jul-06 23:49 
GeneralRe: Data structure and exception Pin
Super Lloyd8-Jul-06 23:52
Super Lloyd8-Jul-06 23:52 
AnswerRe: Data structure and exception Pin
Igor Sukhov8-Jul-06 23:58
Igor Sukhov8-Jul-06 23:58 
GeneralRe: Data structure and exception Pin
Super Lloyd9-Jul-06 0:08
Super Lloyd9-Jul-06 0:08 
QuestionHow to read file from a FTP site Pin
Zami_28-Jul-06 19:33
Zami_28-Jul-06 19:33 
AnswerRe: How to read file from a FTP site Pin
Ravi Bhavnani8-Jul-06 21:03
professionalRavi Bhavnani8-Jul-06 21:03 
QuestionHow can I copy a treeView to listBox? Pin
AngryC8-Jul-06 18:57
AngryC8-Jul-06 18:57 
AnswerRe: How can I copy a treeView to listBox? [modified] Pin
Andrew Lygin8-Jul-06 20:23
Andrew Lygin8-Jul-06 20:23 
GeneralRe: How can I copy a treeView to listBox? [modified] Pin
AngryC8-Jul-06 21:08
AngryC8-Jul-06 21:08 
GeneralRe: How can I copy a treeView to listBox? Pin
Andrew Lygin8-Jul-06 22:14
Andrew Lygin8-Jul-06 22:14 

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.