Forum » Programiranje » [C#] in ComboBox
[C#] in ComboBox
ql000 ::
OK, sej mogoče se zdi smešno, samo enostavno ne znam priti do izbranega elementa v comboboxu.
Tu naredim populacijo:
Kako sedaj dostopam, do teh objektov, da npr. zapišem izbran objekt v nek textbox?
Tu naredim populacijo:
BaudRateCombobox.Items.Add(1200); BaudRateCombobox.Items.Add(2400); BaudRateCombobox.Items.Add(4800); BaudRateCombobox.Items.Add(9600); BaudRateCombobox.Items.Add(19200); BaudRateCombobox.Items.Add(38400); BaudRateCombobox.Items.Add(57600); BaudRateCombobox.Items.Add(115200);
Kako sedaj dostopam, do teh objektov, da npr. zapišem izbran objekt v nek textbox?
Rapsey ::
seznam propertijov:
- SelectedIndex Overridden. Gets or sets the index specifying the currently selected item.
- SelectedItem Gets or sets currently selected item in the ComboBox.
- SelectedText Gets or sets the text that is selected in the editable portion of a ComboBox.
- SelectedValue Gets or sets the value of the member property specified by the ValueMember property.(Inherited from ListControl.)
- SelectedIndex Overridden. Gets or sets the index specifying the currently selected item.
- SelectedItem Gets or sets currently selected item in the ComboBox.
- SelectedText Gets or sets the text that is selected in the editable portion of a ComboBox.
- SelectedValue Gets or sets the value of the member property specified by the ValueMember property.(Inherited from ListControl.)
Vredno ogleda ...
| Tema | Ogledi | Zadnje sporočilo | |
|---|---|---|---|
| Tema | Ogledi | Zadnje sporočilo | |
| » | [C#] Delo z okni - urejanje osebeOddelek: Programiranje | 1087 (959) | darkolord |
| » | c# datagridview in comboxOddelek: Programiranje | 1345 (1233) | OmegaM |
| » | [Visual C#] TableAdapterOddelek: Programiranje | 1290 (1166) | detroit |
| » | [VB] Komunikacija s serijskimi napravamiOddelek: Programiranje | 2479 (1753) | mNeRo |
| » | [C#] toString ne delaOddelek: Programiranje | 1423 (1313) | rokpok |