// Poistaa viitteenä saadun scroll buttonin. private void RemoveScrollButton(ref Button button, GuiEventHandler <GuiButtonEventArgs> pressEvent) { button.ButtonPressed -= pressEvent; button.ButtonDown -= pressEvent; button.ReleaseParent(); button.Dispose(); childs.RemoveChild(button); }
/// <summary> /// Poistaa kontrollin containerista. Poistaa siteen kontrollien väliltä. /// </summary> public virtual void Remove(Control control) { childs.RemoveChild(control); control.ReleaseParent(); GuiLayoutEventArgs guiLayoutEventArgs = new GuiLayoutEventArgs(control); OnControlRemoved(new GuiParentEventArgs(null, control), this); UpdateLayout(guiLayoutEventArgs); }