Exemplo n.º 1
0
 private void Column_Resized(object sender, ResizeEventArgs e)
 {
     // reposition the columns
     if (sender != null)
     {
         PositionColumns();
     }
 }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            RecalcParams();
            if (Value + PageSize > Range)
            {
                Value = Range - PageSize;
            }
        }
Exemplo n.º 3
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            CalcScrolling();

            // Crappy fix to certain scrolling issue
            //if (sbVert != null) sbVert.Value -= 1;
            //if (sbHorz != null) sbHorz.Value -= 1;
        }
Exemplo n.º 4
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            if (btnDown != null)
            {
                btnDown.Width  = 16;
                btnDown.Height = Height - Skin.Layers[0].ContentMargins.Vertical;
                btnDown.Top    = Skin.Layers[0].ContentMargins.Top;
                btnDown.Left   = Width - btnDown.Width - 2;
            }
        }
Exemplo n.º 5
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            if (clientArea != null)
            {
                clientArea.Left   = ClientLeft;
                clientArea.Top    = ClientTop;
                clientArea.Width  = ClientWidth;
                clientArea.Height = ClientHeight;
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Event handler that will resize the scrollbars when resizes take place or strings are added
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Recalc(object sender, ResizeEventArgs e)
        {
            if (!vert.Enabled) vert.Enabled = true;

            if (data != null && data.Count > 0)
            {
                SkinText font = Skin.Layers["Control"].Text;
                int h = (int)font.Font.Resource.MeasureString(data.Peek()).Y;

                int sizev = Height - Skin.Layers["Control"].ContentMargins.Vertical;
                vert.Range = data.Count * 10;
                vert.PageSize = (int)Math.Floor((float)sizev * 10 / h);
                Invalidate();
            }
            else if (data == null || data.Count <= 0)
            {
                vert.Range = 1;
                vert.PageSize = 1;
                Invalidate();
            }
        }
Exemplo n.º 7
0
        ////////////////////////////////////////////////////////////////////////////    

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            ItemsChanged();
        }
Exemplo n.º 8
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
        }
Exemplo n.º 9
0
    ////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////
    private void Bars_Resize(object sender, ResizeEventArgs e)
    {
      AdjustMargins();      
    }
Exemplo n.º 10
0
    ////////////////////////////////////////////////////////////////////////////           


    ////////////////////////////////////////////////////////////////////////////           
    protected override void OnResize(ResizeEventArgs e)
    {
      SetMovableArea();
      base.OnResize(e);
    }
Exemplo n.º 11
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            CalcLayout();
            base.OnResize(e);
        }
Exemplo n.º 12
0
        /// <summary>
        /// OnResize override to reposition the control properly.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            // Adjust the controls..
            this.CalculateScrolling();
            this.PositionControls();
        }
Exemplo n.º 13
0
		////////////////////////////////////////////////////////////////////////////     

		////////////////////////////////////////////////////////////////////////////     
		protected override void OnResize(ResizeEventArgs e)
		{
			base.OnResize(e);
		}
Exemplo n.º 14
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            ItemsChanged();
        }
Exemplo n.º 15
0
 ////////////////////////////////////////////////////////////////////////////        
 ////////////////////////////////////////////////////////////////////////////        
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
       selection.Clear();
       SetupBars();
 }
Exemplo n.º 16
0
 ////////////////////////////////////////////////////////////////////////////
 
 ////////////////////////////////////////////////////////////////////////////     
 protected override void OnResize(ResizeEventArgs e)
 {
   base.OnResize(e);     
   RecalcParams();
   if (Value + PageSize > Range) Value = Range - PageSize;              
 }
Exemplo n.º 17
0
 ////////////////////////////////////////////////////////////////////////////   
     
 ////////////////////////////////////////////////////////////////////////////   
 void Recalc(object sender, ResizeEventArgs e)
 {
   // Disable scrollbars when there is nothing to scroll
   horz.Enabled = box.Width < image.Width;
   vert.Enabled = box.Height < image.Height; 
         
   vert.Range = image.Height;  // Set range to width of the image, one step equals to one pixel of the image
   vert.PageSize = box.Height; // Size of the slider according to displayed portion of the image
   
   horz.Range = image.Width; // Same like above, just for horizontal scrollbar
   horz.PageSize = box.Width;
         
   // Portion of the image we are actually displaying in the imagebox
   box.SourceRect = new Rectangle(horz.Value, vert.Value, box.Width, box.Height);
   
   // Make the imagebox redraw
   box.Invalidate(); 
 }
Exemplo n.º 18
0
		////////////////////////////////////////////////////////////////////////////    

		////////////////////////////////////////////////////////////////////////////     
		protected override void OnResize(ResizeEventArgs e)
		{
			base.OnResize(e);

			if (btnUp != null)
			{
				btnUp.Width = 16;
				btnUp.Height = Height - Skin.Layers["Control"].ContentMargins.Vertical;
				btnUp.Top = Skin.Layers["Control"].ContentMargins.Top;
				btnUp.Left = Width - 16 - 2 - 16 - 1;
			}
			if (btnDown != null)
			{
				btnDown.Width = 16;
				btnDown.Height = Height - Skin.Layers["Control"].ContentMargins.Vertical;
				btnDown.Top = Skin.Layers["Control"].ContentMargins.Top; ;
				btnDown.Left = Width - 16 - 2;
			}
		}
Exemplo n.º 19
0
 /// <summary>
 /// Handles resizing of the stack panel container.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnResize(ResizeEventArgs e)
 {
     CalcLayout();
     base.OnResize(e);
 }
Exemplo n.º 20
0
        /// <summary>
        /// Handles resize events for the clip control.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            // Update client area dimensions.
            if (clientArea != null)
            {
                clientArea.Left = ClientLeft;
                clientArea.Top = ClientTop;
                clientArea.Width = ClientWidth;
                clientArea.Height = ClientHeight;
            }
        }
Exemplo n.º 21
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        private void Bars_Resize(object sender, ResizeEventArgs e)
        {
            AdjustMargins();
        }
Exemplo n.º 22
0
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);

            UpdateBackground(e.Width, e.Height);
        }
Exemplo n.º 23
0
 ////////////////////////////////////////////////////////////////////////////
 
 ////////////////////////////////////////////////////////////////////////////   
 protected override void OnResize(ResizeEventArgs e)
 {
   base.OnResize(e);
   RecalcParams();      
 }
Exemplo n.º 24
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            CalcScrolling();
            base.OnResize(e);
        }
Exemplo n.º 25
0
    ////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////           
    protected override void OnResize(ResizeEventArgs e)
    {             
      base.OnResize(e);
      CalcScrolling();
      
      // Crappy fix to certain scrolling issue
      //if (sbVert != null) sbVert.Value -= 1; 
      //if (sbHorz != null) sbHorz.Value -= 1;      
    }
Exemplo n.º 26
0
 private void Table_Resize(object sender, ResizeEventArgs e)
 {
     PositionColumns();
 }
Exemplo n.º 27
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        protected override void OnResize(ResizeEventArgs e)
        {
            base.OnResize(e);
            RecalcParams();
        }
Exemplo n.º 28
0
 /// <summary>
 /// Handles resize events for the text box.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnResize(ResizeEventArgs e)
 {
     // Clear text selection and update scroll bars.
     base.OnResize(e);
     selection.Clear();
     SetupBars();
 }
Exemplo n.º 29
0
    ////////////////////////////////////////////////////////////////////////////           


    ////////////////////////////////////////////////////////////////////////////           
    protected override void OnResize(ResizeEventArgs e)
    {
      SetMovableArea();
      base.OnResize(e);
    }
Exemplo n.º 30
0
 void OpenFileDialog_Resize(object sender, ResizeEventArgs e)
 {
     FilesList.ClientWidth = OpenFileDialog.Width - 15;
     FilesList.ClientHeight = OpenFileDialog.ClientHeight - 40;
 }