Filing Combobox with alphabet
-
Automaticly!! Not Manual!
nemanja
-
I want to fill my combo box with alphabet
nemanja
private void PopulateComboBox()
{
for (int i = 65; i < 91; i++)
{
comboBox1.Items.Add(Convert.ToChar(i));
}
} -
Automaticly!! Not Manual!
nemanja
-
I want to fill my combo box with alphabet
nemanja
-
Here is one way:
for (char i = 'A'; i <= 'Z'; i++) comboBox1.Items.Add(i);
--- Year happy = new Year(2007);
Well I didn't know you could increment chars. Assimilated :)
-
Well I didn't know you could increment chars. Assimilated :)
A char automatically converts to an int, I believe. It definatley does in c++.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
I want to fill my combo box with alphabet
nemanja
comboBox.DataSource = {'a','b','c','d','e','f','g','h','i','j','k' ... 'z'};
Just being funny. But itll work.
File Not Found
-
A char automatically converts to an int, I believe. It definatley does in c++.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
comboBox.DataSource = {'a','b','c','d','e','f','g','h','i','j','k' ... 'z'};
Just being funny. But itll work.
File Not Found
Here's another funny one. :)
public static class Alphabet {
public static IEnumerator Lower() {
for (char i = 'a'; i <= 'z'; i++) yield return i;
}public static IEnumerator Upper() {
for (char i = 'A'; i <= 'Z'; i++) yield return i;
}}
foreach (char i in Alphabet.Lower()) comboBox1.Items.Add(i);
--- Year happy = new Year(2007);
-
Here's another funny one. :)
public static class Alphabet {
public static IEnumerator Lower() {
for (char i = 'a'; i <= 'z'; i++) yield return i;
}public static IEnumerator Upper() {
for (char i = 'A'; i <= 'Z'; i++) yield return i;
}}
foreach (char i in Alphabet.Lower()) comboBox1.Items.Add(i);
--- Year happy = new Year(2007);
thats what I wrote the first time. But I created an interface first then I deleted the entire post because I was afraid someone would think I was serious.
File Not Found