Exemplo n.º 1
0
        public ClipControl(Manager manager) : base(manager)
        {
            clientArea = new ClipBox(manager);

            clientArea.Init();
            clientArea.MinimumWidth  = 0;
            clientArea.MinimumHeight = 0;
            clientArea.Left          = ClientLeft;
            clientArea.Top           = ClientTop;
            clientArea.Width         = ClientWidth;
            clientArea.Height        = ClientHeight;

            base.Add(clientArea);
        }
Exemplo n.º 2
0
        /// <param name="manager">GUI manager for the control.</param>
        /// <summary>
        /// Creates a new ListBox control.
        /// </summary>
        public ListBox(Manager manager)
            : base(manager)

        {
            Width         = 64;
            Height        = 64;
            MinimumHeight = 16;


// Set up the scroll bar.
            sbVert = new ScrollBar(Manager, Orientation.Vertical);
            sbVert.Init();
            sbVert.Parent   = this;
            sbVert.Left     = Left + Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Right;
            sbVert.Top      = Top + Skin.Layers["Control"].ContentMargins.Top;
            sbVert.Height   = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            sbVert.Anchor   = Anchors.Top | Anchors.Right | Anchors.Bottom;
            sbVert.PageSize = 25;
            sbVert.Range    = 1;
            sbVert.PageSize = 1;
            sbVert.StepSize = 10;
            sbVert.Visible  = !HideScrollbars;


// Set up the clip box.
            pane = new ClipBox(manager);
            pane.Init();
            pane.Parent   = this;
            pane.Top      = Skin.Layers["Control"].ContentMargins.Top;
            pane.Left     = Skin.Layers["Control"].ContentMargins.Left;
            pane.Width    = Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Horizontal - 1;
            pane.Height   = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            pane.Anchor   = Anchors.All;
            pane.Passive  = true;
            pane.CanFocus = false;
            pane.Draw    += DrawPane;


            CanFocus = true;
            Passive  = false;
        }