Пример #1
0
        public TextArea() {

            base.RefreshAllow = false;

            gFont = new Font("宋体", 9);
            gFM = new Fonts.Manager(gFont);
            gColor = Color.Black;
            gnLineHeight = 18;

            base.ShadowsSize = 2;
            base.BorderSize = 1;
            base.SetPadding(0);

            base.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
            base.ShadowsColor = Color.FromArgb(0x22, 0x22, 0x22);
            base.BorderColor = Color.FromArgb(0x88, 0x88, 0x88);

            gItems = new List<TextAreaClass.LineText>();
            SetNullText();

            SetSelectPos(0, 0);

            gVScroll = new VerticalScroll();
            gVScroll.Absolute = true;
            gVScroll.Name = "VerticalScroll";
            gVScroll.BackgroundColor = Color.FromArgb(200, 0x22, 0x22, 0x22);
            gVScroll.SetBounds(base.DisplayRectangle.Width - SCROLL_SIZE, 0, SCROLL_SIZE, base.DisplayRectangle.Height);
            gVScroll.MaxValue = 100;
            gVScroll.Visible = true;
            gVScroll.zIndex = 1;
            gVScroll.ValueChanged += GVScroll_ValueChanged;
            base.Controls.Add(gVScroll);

            base.RefreshAllow = true;
        }
Пример #2
0
        public Panel() {

            base.RefreshAllow = false;

            //gHScroll
            gScrollMode = ScrollModes.None;
            gnBorderSize = 1;
            gnDisplayRect = new System.Drawing.Rectangle(gnBorderSize, gnBorderSize, base.Width - gnBorderSize * 2, base.Height - gnBorderSize * 2);

            gHScroll = new HorizontalScroll();
            gHScroll.Name = "HorizontalScroll";
            gHScroll.BackgroundColor = Color.FromArgb(200, 0x22, 0x22, 0x22);
            gHScroll.SetBounds(0, gnDisplayRect.Height - SCROLL_SIZE, gnDisplayRect.Width, SCROLL_SIZE);
            gHScroll.MaxValue = 100;
            gHScroll.Visible = false;
            gHScroll.zIndex = 1;
            gHScroll.ValueChanged += gHScroll_ValueChanged;
            base.Controls.Add(gHScroll);

            gVScroll = new VerticalScroll();
            gVScroll.Name = "VerticalScroll";
            gVScroll.BackgroundColor = Color.FromArgb(200, 0x22, 0x22, 0x22);
            gVScroll.SetBounds(gnDisplayRect.Width - SCROLL_SIZE, 0, SCROLL_SIZE, gnDisplayRect.Height);
            gVScroll.MaxValue = 100;
            gVScroll.Visible = false;
            gVScroll.zIndex = 1;
            gVScroll.ValueChanged += gVScroll_ValueChanged;
            base.Controls.Add(gVScroll);

            gLabel = new Label();
            gLabel.AutoSize = false;
            gLabel.BackgroundColor = Color.FromArgb(230, 0x22, 0x22, 0x22);
            gLabel.SetBounds(gnDisplayRect.Width - SCROLL_SIZE, gnDisplayRect.Height - SCROLL_SIZE, SCROLL_SIZE, SCROLL_SIZE);
            gLabel.Visible = false;
            gLabel.zIndex = 1;
            base.Controls.Add(gLabel);

            base.RefreshAllow = true;
            //this.MouseWheel += Panel_MouseWheel;
        }