// Event method // Default event private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (OnSelectedIndexChanged != null) { OnSelectedIndexChanged.Invoke(sender, e); } lblText.Text = cmbList.Text; }
private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) {/*This event method is subscribed to the SelectedIndexChanged event of the * ComboBox (comboList), therefore, the event happens when the selection index of the ComboBox * changes, then:*/ //Raise/Invoke default event created to execute all events subscribed to this in the form code. if (OnSelectedIndexChanged != null) { OnSelectedIndexChanged.Invoke(comboList, e); } label.Text = comboList.Text;//When an item is selected from the drop-down list refresh the label text. }
public void SelectItem(uint index, bool notifyListener) { if (index >= Items.Count) { string desc = "Menu \"" + Name + "\" contains no item at position " + (index).ToString() + "."; OGRE_EXCEPT("Mogre.Exception.ERR_ITEM_NOT_FOUND", desc, "SelectMenu::selectItem"); } selectionIndex = (int)index; FitCaptionToArea(Items[(int)index], ref smallTextAreaElement, smallBoxElement.Width - smallTextAreaElement.Left * 2f); if (listener != null && notifyListener) { listener.itemSelected(this); } OnSelectedIndexChanged?.Invoke(this, (int)index); }
private void FListView_SelectedIndexChanged(object sender, EventArgs e) { OnSelectedIndexChanged?.Invoke(sender, e); }