Glossary Item Box

LabDevTools Spedisci un commento su questo argomento.

BackgroundTransparent

Ottiene o imposta lo sfondo del controllo trasparente. 

 

[Visual Basic]
Public Property BackgroundTransparent As Boolean
 
[C#]
public bool BackgroundTransparent
Osservazioni:

Di default tale proprietà è impostata su False.

 

Se la componente alpha del colore di un elemento grafico del controllo viene impostato sullo zero  tale elemento non solo non viene disegnato ma l'area da esso occupata  diventa transparente. 

Nell' esempio della figura di sopra sul form è stato inserita una PictureBox con sopra parzialmente sovrapposta una Knob con i valori delle proprietà così impostate:

 

 [Visual Basic]

Me.Knob1.Appearance.ArcEnd = 290.0!
Me.Knob1.Appearance.ArcStart = 250.0!
Me.Knob.Appearance.BackgroundScale.BackgroundScale = False
Me.Knob1.Appearance.BackgroundScale.BackgroundScaleWidth = 50
Me.Knob1.Appearance.BackgroundScale.FirstColor = System.Drawing.Color.Blue
Me.Knob1.Appearance.BackgroundScale.FourthColor = System.Drawing.Color.Red
Me.Knob1.Appearance.BackgroundScale.Gradient = True
Me.Knob1.Appearance.BackgroundScale.SecondColor = System.Drawing.Color.Green
Me.Knob1.Appearance.BackgroundScale.ThirdColor = System.Drawing.Color.Yellow
Me.Knob1.Appearance.BorderProperties.BorderLight = System.Drawing.Color.White
Me.Knob1.Appearance.BorderProperties.BorderShadow = System.Drawing.Color.Black
Me.Knob1.Appearance.BorderProperties.BorderWidth = CType(10, Short)
Me.Knob1.Appearance.CursorProperties.CursorColor = System.Drawing.Color.Blue
Me.Knob1.Appearance.CursorProperties.CursorType = LabDevTools.CursorProperties.CursorForm.Triangular
Me.Knob1.Appearance.CursorProperties.CursorWidth = 3
Me.Knob1.Appearance.CursorProperties.TraceCursor = False
Me.Knob1.Appearance.Divisions.ArcBaseColor = System.Drawing.Color.Red
Me.Knob1.Appearance.Divisions.DivisionLength = CType(10, Short)
Me.Knob1.Appearance.Divisions.Divisions = True
Me.Knob1.Appearance.Divisions.DivisionWidth = CType(5, Short)
Me.Knob1.Appearance.Divisions.MayorColor = System.Drawing.Color.Red
Me.Knob1.Appearance.Divisions.MediumColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(255, Byte), CType(64, Byte))
Me.Knob1.Appearance.Divisions.MinorColor = System.Drawing.Color.Blue
Me.Knob1.Appearance.Divisions.NumberOfDivisions = CType(10, Short)
Me.Knob1.Appearance.FrontColor = System.Drawing.Color.Transparent
Me.Knob1.Appearance.GradientStyle = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal
Me.Knob1.Appearance.Labels = True
Me.Knob1.Appearance.Radius = 62.0!
Me.Knob1.Appearance.Style = LabDevTools.Appearance.StyleKnob.Style3D
Me.Knob1.BackColor = System.Drawing.Color.Transparent
Me.Knob1.BackgroundTransparent = True
Me.Knob1.Cursor = System.Windows.Forms.Cursors.Hand
Me.Knob1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.Knob1.ForeColor = System.Drawing.Color.Black
Me.Knob1.KeyInput.Increment = 1.0!
Me.Knob1.KeyInput.KeyDecrement = LabDevTools.KeyInput.Keys.PageDown
Me.Knob1.KeyInput.KeyIncrement = LabDevTools.KeyInput.Keys.PageUp
Me.Knob1.KeyInput.KeyInput = True
Me.Knob1.Language = LabDevTools.Knob.LocalLanguage.Italian
Me.Knob1.Location = New System.Drawing.Point(768, 240)
Me.Knob1.Name = "Knob1"
Me.Knob1.ScaleMeasurement.Format = "Default"
Me.Knob1.ScaleMeasurement.Invert = False
Me.Knob1.ScaleMeasurement.Unit = ""
Me.Knob1.Size = New System.Drawing.Size(216, 216)
Me.Knob1.TabIndex = 14
Me.Knob1.Values.Max = 10
Me.Knob1.Values.Max_Visible = True
Me.Knob1.Values.Min = 0
Me.Knob1.Values.Min_Visible = True
Me.Knob1.Values.Tooltip = True
Me.Knob1.Values.Value = 0
Me.Knob1.Values.ValueInString = "0"

 

[C#]

this.knob1.Appearance.ArcEnd = 290;

this.knob1.Appearance.ArcStart = 250;

this.knob1.Appearance.BackgroundScale.BackgroundScale = false;

this.knob1.Appearance.BackgroundScale.BackgroundScaleWidth = 50;

this.knob1.Appearance.BackgroundScale.FirstColor = System.Drawing.Color.Blue;

this.knob1.Appearance.BackgroundScale.FourthColor = System.Drawing.Color.Red;

this.knob1.Appearance.BackgroundScale.Gradient = true;

this.knob1.Appearance.BackgroundScale.SecondColor = System.Drawing.Color.Green;

this.knob1.Appearance.BackgroundScale.ThirdColor = System.Drawing.Color.Yellow;

this.knob1.Appearance.BorderProperties.BorderLight = System.Drawing.Color.White;

this.knob1.Appearance.BorderProperties.BorderShadow = System.Drawing.Color.Black;

this.knob1.Appearance.BorderProperties.BorderWidth = 10;

this.knob1.Appearance.CursorProperties.CursorColor = System.Drawing.Color.Blue;

this.knob1.Appearance.CursorProperties.CursorType = LabDevTools.CursorProperties.CursorForm.Triangular;

this.knob1.Appearance.CursorProperties.CursorWidth = 3;

this.knob1.Appearance.CursorProperties.TraceCursor = false;

this.knob1.Appearance.Divisions.ArcBaseColor = System.Drawing.Color.Red;

this.knob1.Appearance.Divisions.DivisionLength = 10;

this.knob1.Appearance.Divisions.Divisions = true;

this.knob1.Appearance.Divisions.DivisionWidth = 5;

this.knob1.Appearance.Divisions.MayorColor = System.Drawing.Color.Red;

this.knob1.Appearance.Divisions.MediumColor = System.Drawing.Color.FromArgb(0, 255,64);

this.knob1.Appearance.Divisions.MinorColor = System.Drawing.Color.Blue;

this.knob1.Appearance.Divisions.NumberOfDivisions = 10;

this.knob1.Appearance.FrontColor = System.Drawing.Color.Transparent;

this.knob1.Appearance.GradientStyle = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal;

this.knob1.Appearance.Labels = true;

this.knob1.Appearance.Radius = 62;

this.knob1.Appearance.Style = LabDevTools.Appearance.StyleKnob.Style3D;

this.knob1.BackColor = System.Drawing.Color.Transparent;

this.knob1.BackgroundTransparent = true;

this.knob1.Cursor = System.Windows.Forms.Cursors.Hand;

this.knob1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25);

this.knob1.ForeColor = System.Drawing.Color.Black;

this.knob1.KeyInput.Increment = 1;

this.knob1.KeyInput.KeyDecrement = LabDevTools.KeyInput.Keys.PageDown;

this.knob1.KeyInput.KeyIncrement = LabDevTools.KeyInput.Keys.PageUp;

this.knob1.KeyInput.KeyInput = true;

this.knob1.Language = LabDevTools.Knob.LocalLanguage.Italian;

this.knob1.Location = new System.Drawing.Point(768, 240);

this.knob1.Name = "knob1";

this.knob1.ScaleMeasurement.Format = "Default";

this.knob1.ScaleMeasurement.Invert = false;

this.knob1.ScaleMeasurement.Unit = "";

this.knob1.Size = new System.Drawing.Size(216, 216);

this.knob1.TabIndex = 14;

this.knob1.Values.Max = 10;

this.knob1.Values.Max_Visible = true;

this.knob1.Values.Min = 0;

this.knob1.Values.Min_Visible = true;

this.knob1.Values.Tooltip = true;

this.knob1.Values.Value = 0;

this.knob1.Values.ValueInString = "0";

 


Copyright © 2007 LabDevTools. All Rights Reserved.