Example #1
0
 public SliderCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
     : base(grid, cellModel)
 {
     cm = (SliderCellModel)cellModel;
     SupportsFocusControl = true;
     FixControlParent(drawSlider);
     SetControl(editSlider);
     editSlider.AutoSize      = false;
     editSlider.ValueChanged += new EventHandler(trackBar_ValueChanged);
     cm.trackBarControlSize   = drawSlider.Size;
 }
Example #2
0
 protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
 {
     if (this.ShouldDrawFocused(rowIndex, colIndex))
     {
         style.Control = editSlider;
     }
     else
     {
         style.Control = drawSlider;
         SliderCellModel.InitializeSlider(drawSlider, style);
     }
     base.OnDraw(g, clientRectangle, rowIndex, colIndex, style);
 }
Example #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                editSlider.ValueChanged -= new EventHandler(trackBar_ValueChanged);
                editSlider.Dispose();
                editSlider = null;
                drawSlider.Dispose();
                drawSlider = null;
                cm         = null;
            }

            base.Dispose(disposing);
        }
Example #4
0
 protected override void InitializeControlText(object controlValue)
 {
     SliderCellModel.InitializeSlider(this.editSlider, controlValue);
 }
Example #5
0
 protected override void OnInitialize(int rowIndex, int colIndex)
 {
     SliderCellModel.InitializeSlider(editSlider, Grid.GetViewStyleInfo(rowIndex, colIndex));
 }