예제 #1
0
        // 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);
        }
예제 #2
0
        /// <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);
        }