public TrackBarEditorElement(TrackBarEditor editor)
 {
     this.CanFocus          = true;
     this.editor            = editor;
     this.Maximum           = 100;
     this.TickFrequency     = 10;
     this.StretchVertically = false;
 }
Exemplo n.º 2
0
        // Fires when the editor changes its value. The value is stored only inside the editor.
        void radGridView1_ValueChanged(object sender, EventArgs e)
        {
            TrackBarEditor editor = sender as TrackBarEditor;

            if (editor != null)
            {
                GridCellElement cell = this.radGridView1.TableElement.GetCellElement(this.radGridView1.CurrentRow, this.radGridView1.Columns["Opacity"]);

                if (cell != null)
                {
                    cell.Text = editor.Value + " %";
                }

                GridCellElement imageCell = this.radGridView1.TableElement.GetCellElement(this.radGridView1.CurrentRow, this.radGridView1.Columns["Image"]);

                if (imageCell != null)
                {
                    imageCell.ImageOpacity = (double)((int)editor.Value / 100.0);
                }
            }
        }