private void Column_Resized(object sender, ResizeEventArgs e) { // reposition the columns if (sender != null) { PositionColumns(); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); if (Value + PageSize > Range) { Value = Range - PageSize; } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// 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; }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// 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; } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); if (clientArea != null) { clientArea.Left = ClientLeft; clientArea.Top = ClientTop; clientArea.Width = ClientWidth; clientArea.Height = ClientHeight; } }
/// <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(); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); ItemsChanged(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// private void Bars_Resize(object sender, ResizeEventArgs e) { AdjustMargins(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { SetMovableArea(); base.OnResize(e); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { CalcLayout(); base.OnResize(e); }
/// <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(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); selection.Clear(); SetupBars(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); if (Value + PageSize > Range) Value = Range - PageSize; }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// 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(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// 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; } }
/// <summary> /// Handles resizing of the stack panel container. /// </summary> /// <param name="e"></param> protected override void OnResize(ResizeEventArgs e) { CalcLayout(); base.OnResize(e); }
/// <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; } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); UpdateBackground(e.Width, e.Height); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// protected override void OnResize(ResizeEventArgs e) { CalcScrolling(); base.OnResize(e); }
private void Table_Resize(object sender, ResizeEventArgs e) { PositionColumns(); }
/// <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(); }
void OpenFileDialog_Resize(object sender, ResizeEventArgs e) { FilesList.ClientWidth = OpenFileDialog.Width - 15; FilesList.ClientHeight = OpenFileDialog.ClientHeight - 40; }