64 |
ImageSize property on 32 (specifies the size of the control' icons)
|
63 |
ImageSize property on 16 (default) (specifies the size of the control' icons)
|
62 |
I found that the control's needle/knob is too small to touch, is it possible somehow to make it working
|
61 |
How can I rotate/move multiple layers once the user drags the layer
|
60 |
How can I show a layer as disabled
with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; with Layers.Add('original') do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; Background.Picture.Name := 'Layer2.png'; DefaultOffsetY := -164; Grayscale := 0; end; with Layers.Add('grayscale 50%') do begin Background.Picture.Name := 'Layer2.png'; Grayscale := 50; DefaultOffsetY := -82; end; with Layers.Add('grayscale 100%') do begin Background.Picture.Name := 'Layer2.png'; Grayscale := 100; end; EndUpdate(); end |
59 |
Is it possible to stretch all layers
|
58 |
Tic Tac Toe Game
// MouseDown event - Occurs when the user presses a mouse button. procedure TWinForm1.AxGauge1_MouseDownEvent(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseDownEvent); begin // Left = Me.Layers(l).Left // Top = Me.Layers(l).Top // Width = Me.Layers(l).Width // Height = Me.Layers(l).Height with AxGauge1 do begin l := get_LayerFromPoint(-1,-1); with Layers do begin with Add(TObject(AxGauge1.LayersCount)) do begin with Background.Picture do begin Left := '8'; Width := 'width - 2 * 8'; Top := '8'; Height := 'height - 2 * 8'; Name := AxGauge1.FormatABC('A mod 2 = 0 ? `x` : `o`',TObject(AxGauge1.Layers.Count),Nil,Nil); end; Transparency := 0; end; end; end end; with AxGauge1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABS0IQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAZAEiWIovRbHMBzFIMYRFFCcIRGSaYDi' + 'CNovTRNE7TfBMIhkGoSaKpCIRVDCSYJUzTc6wS79KgAASiJjjao6ZhaSpSABRYiyXRlHSxLiuYyoGTrJACEQxDhEEIjGLAazLMadJItCzabqGbJ8Ro6cQwTAIgI='); set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerWidth,'width/3'); set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerHeight,'height/3'); set_HTMLPicture('x','C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\x.png'); set_HTMLPicture('o','C:\Program Files\Exontrol\ExGauge\Sample\Design\Pictures\o.png'); LayerAutoSize := -1; Layers.Count := 9; with Layers.Item[TObject(0)] do begin Background.Color.Value := $1000000; end; with Layers.Item[TObject(1)] do begin Left := ' width/3 - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(2)] do begin Left := '2 * (width/3 - 4) - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(3)] do begin Top := 'height/3 - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(4)] do begin Top := 'height/3 - 4'; Left := ' width/3 - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(5)] do begin Top := 'height/3 - 4'; Left := '2 * (width/3 - 4) - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(6)] do begin Top := '2 * (height/3 - 4) '; Background.Color.Value := $1000000; end; with Layers.Item[TObject(7)] do begin Top := '2 * (height/3 - 4) '; Left := ' width/3 - 4'; Background.Color.Value := $1000000; end; with Layers.Item[TObject(8)] do begin Top := '2 * (height/3 - 4) '; Left := '2 * (width/3 - 4) - 4'; Background.Color.Value := $1000000; end; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,TObject(99)); EndUpdate(); end |
57 |
What's the difference Rotate vs Rotamove
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 227 end; with AxGauge1 do begin AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Button with LEDs'; with Layers do begin with Add('base') do begin end; with Add('rotate') do begin ToolTip := Key; with Background.Picture do begin Name := 'Example Button Up.png'; Left := 'width/2'; Top := 'height/2'; Width := 128; Height := 64; end; with Foreground do begin Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption] := '<font ;14><sha ;;0>Rotate'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft] := 'width/2 + 32'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop] := 'height/2 + 16'; end; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateAngle := 45; end; with Add('rotamove') do begin ToolTip := Key; with Background.Picture do begin Name := 'Example Button Up.png'; Left := 'width/2'; Top := 'height/2'; Width := 128; Height := 64; end; with Foreground do begin Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption] := '<font ;14><sha ;;0>Rotamove'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft] := 'width/2 + 24'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop] := 'height/2 + 16'; end; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := 100; RotateAngle := 45; Transparency := 25; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; end; end; end |
56 |
How do I display a tooltip, when cursor hovers the layer
// MouseIn event - Notifies that the cursor enters the layer. procedure TWinForm1.AxGauge1_MouseIn(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseInEvent); begin with AxGauge1 do begin Layers.Item[TObject(9)].ToolTip := AxGauge1.FormatABC('`The current value is: <br><c><b>` + ((100 - A) format ``)',AxGauge1.Value,Nil,Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 10; with Layers.Item[TObject(9)] do begin DefaultRotateAngle := -126; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleToValue := '100 - value / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; end; Layers.Item[TObject(3)].Visible := False; Layers.Item[TObject(4)].Visible := False; Layers.Item[TObject(9)].Value := TObject(25); EndUpdate(); end |
55 |
I've noticed that the OnDrag can move the layer itself, but how about moving the clipping region
|
54 |
How do I show a portion of layer with a different color (sample 2)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['Color'].Clip.Value := TObject(AxGauge1.Layers.Item['Thumb'].RotateAngle); with Layers.Item['Color'] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := RotateAngle; end; Layers.Item['Thumb'].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := AxGauge1.Layers.Item['Color'].RotateAngle; end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 5; Layers.Item[TObject(1)].Visible := False; with Layers.Item[TObject(4)] do begin Key := 'Thumb'; DefaultRotateAngle := -141; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; end; with Layers.Add('Color') do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Position := 3; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; Background.Picture.Name := 'Layer3.png'; Clip.Pie.SweepAngle := 'value'; with Clip.Ellipse do begin RadiusX := '150'; RadiusY := '150'; InverseClip := True; end; end; Layers.Item['Thumb'].RotateAngle := 135; EndUpdate(); end |
53 |
How do I show a portion of layer with a different color (sample 1)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['Color'].Clip.Value := TObject(AxGauge1.Layers.Item['Thumb'].RotateAngle); with Layers.Item['Color'] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := RotateAngle; end; Layers.Item['Thumb'].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := AxGauge1.Layers.Item['Color'].RotateAngle; end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 5; Layers.Item[TObject(1)].Visible := False; with Layers.Item[TObject(4)] do begin Key := 'Thumb'; DefaultRotateAngle := -141; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := 100; end; with Layers.Add('Color') do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Position := 3; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := 100; Background.Picture.Name := 'Layer3.png'; Clip.Pie.SweepAngle := 'value'; end; Layers.Item['Thumb'].RotateAngle := 135; EndUpdate(); end |
52 |
How can I display / clip a picture with no transparency
with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; with Layers.Add('default') do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; Background.Picture.Name := 'Layer2.png'; DefaultOffsetY := -164; end; with Layers.Add('notransparency') do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; Background.Picture.Name := 'Layer2.png'; with Clip.Picture do begin Name := AxGauge1.Layers.Item['notransparency'].Background.Picture.Name; AlphaTo := '128'; end; Grayscale := 100; end; EndUpdate(); end |
51 |
How can I resize all layers
with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 5; with Layers.Add('autosize') do begin Visible := False; Width := 164; Height := 128; end; LayerAutoSize := Layers.Item['autosize'].Index; EndUpdate(); end |
50 |
How can I start moving any layer when user clicks it
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // Layers(DragInfo.Layer).OnDrag = 1 end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 11; end |
49 |
How can I prevent dragging the layers when user right click it
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // Cancel = Me.FormatABC("A=2",DragInfo.Button) end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 11; Layers.Item[TObject(0)].OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; end |
48 |
Is your control DPI-Aware
with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 11; Layers.Item[TObject(3)].Grayscale := 100; Layers.Item[TObject(4)].Grayscale := 100; with Layers.Item[TObject(10)] do begin Width := '128 * dpix'; Height := '128 * dpiy'; end; Layers.Item[TObject(9)].OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; LayerAutoSize := 10; end |
47 |
Is it possible to make the control transparent, I would like to put the control on a form, then make the form transparent so the control appears on the desktop with just the images contained in the layers visible
with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 10; with Layers.Item[TObject(9)] do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; end; AllowMoveOnClick := True; LayerUpdate := EXGAUGELib.LayerUpdateEnum.exLayerUpdateScreen; end |
46 |
How can I show the layers on perspective
|
45 |
Is it possible to resize all layers after they are loaded (method 2)
with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 11; Layers.Item[TObject(3)].Grayscale := 100; Layers.Item[TObject(4)].Grayscale := 100; Layers.Item[TObject(9)].OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; with Layers.Item[TObject(10)] do begin Width := 128; Height := 128; end; LayerAutoSize := 10; end |
44 |
Is it possible to resize all layers after they are loaded (method 1)
|
43 |
Is it possible to load images for different layers from different folders
with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 12; Layers.Item[TObject(0)].Background.Picture.Name := '\..\Clock\vista_clock.png'; Layers.Item[TObject(9)].Background.Picture.Name := '\..\Knob 2\Layer3.png'; Layers.Item[TObject(10)].Background.Picture.Name := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noBack.png'; with Layers.Item[TObject(11)] do begin DefaultOffsetX := 64; DefaultOffsetY := -36; with Background.Picture do begin Name := 'gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQEX5JIhBKhYQrFSxNNhUKoUY7/c6+R6+a7pPg0UAjaISTQwCzMEgtWQ2IyDBJJMYiNJCJgTVJuMghNTcSgFAx' + 'lNZiMinYKNRQ2NxMBhWNQkSRUAQkRRNEhYEBhMogMADOwGfY6N7eXb3DgXeamZgMGbQIStE55RZ7c7ce7/XpzZycOaBf7ZNAlZwiGQIMAnQBnAL4ACKAACABXADMAY4B' + 'LgHYiXS6VQAESyDbAHYAGwvea9E4BXhPIgXD4KQCZD4FeAJzqWFLcNQf1KkSgyFYGMDmVoAEwAHjxQDiOo7AbgKqlaj8WQBRgxDYBfmabpDRTXdumF5ZSwVboXIBrToA' + 'hgBIwHWFREvoNZtlsb42G6Kg2g4b59AeYgAnAMpWnqBZWk2JoIkQcY8AGQAvgAPBWkcScUnceh6FoLYWAsepsGwLBsCcMIMh8C4AHYOAODOVIUHaYwviKMgvh2eIxmOR' + 'xcnHJ5MjYExBlmM5nBAVgqGodY9nuFxXGoA5al8WIJmAe5OgAIxtD6bJUimU5uC4GxFiOaxXkOc59lwOh0kkFYREWFZ6iSdhiiMQBSg0VArFWAZ0CgepijEKJdlcBZnn' + 'uaJ2n2PBZCgaAHnESZsHmRpFlKBBECQY5hA2DoOgaYYYCoC4zjObpAkCAJ+mVGgQBEFZ7CSVgbgYYYGk8c4ugODRFFgKRUnYAZ4C8E5ECqWwOl8d5/gcGgjmALQRjiUB' + 'Qmg9oVDWBAIFoAZ8DmBoAlcWoBlwWAjHEK5pnSehpDALR9A2U1+FWAB3B2X4rmCJwaBcLQNmiG4AG8do6FkLRWjEOw7GsEwRBQUogCIEBRH0LJEAQeR8h4c55jyXwDmA' + 'K9TlMLIoBcS4pgAZwBGwaB3FIGIDBHopsmWS4Xh2HpUgoPhvkOcYcWANBWiCIh5GicJhnKUOvCcJp0CIGxNg6doEIUUopHSGoAA+OhhFeKgVBoGIYnCfo7HcTgdhuG4z' + 'kWBB68GdJmkKQQPcSVx6Hue47l0foMAAZ5yjkXJTBoW5ekgSglFKZ4AAYO5BDwIAdkgZZykcWg3G8OoPlgNpDicT4fH6AwZk+M4zDEMwZGMVB9GGZgqGeO51kmfAbnyG' + 'QZjSVofmeepzB8Nojmqah+gQEAzCsKfvgoI5oniYOvCCZaghiWfeiWNY2mOOJ2CMKJyDUVpOhwR38EcDpWlq/4Ox6xLAxCMIkRAShQCoC4C4D42RaCpH+BAGY1wDiDFo' + 'GgbwFQIjbHuH0Y48x+BUCeE8O47h0DRBeN8FwFAFC7ESMgJ4AAOARFyCsOQSgIhbEsK0FoywZC2DaOsFAig3DOGYMwPguAzjPE8G8QZFT1ghEA5IG4QhaHIB4M8JragU' + 'itDqK5jIrhvj2HoLYU49hHjvA+NsWQZRligHWLoDwRAkAaGcBICIExIshBwAgQQ8ojjMCeAcB4Hh8DiGMI0X4rhiixEyNcLQBwRASAEIgKAKxjB7CMEAfIfhbjrB0E4J' + 'QGxOgWEiF4CIzhFjgDi+gfQdh2jaBqLQPo+x7CNHSEwYwfwWCfHeA5WYXgsBYAQG4bougag/B6P0eYHwpg/A4D8F4pBXArGQJwRI9RviGHyDYQARQAAVAAPoTwAACCQG' + 'oCADgrxljzF0KwVwbgDBnGIJIDgGxnCxHgDoGInAxhmC+O4agjwUCQBMEIVAiA3ALCiMkRAKgAhcGsHEKgTg3BFikGoEQ3hqCkE0DsMILQbgCGADgVwGwsiOCKCYGQBB' + 'AgREiKoRABIkATGYK4AAThJAGBCEACYEAEhRGKBAFoCAmBgEYAkSQCQthtEuPsWwAAkgUCIAARzUgnD3HoHAS46xMDFWgDUbQLAlDMgiKsFwIw2AzGwEoUQJXQjXCIGI' + 'AwQhUh9DiJQBAxwQAwFID0IA2wjCkCQBEBYUw3g2AWMsKwNAvgqFWLQJIOwbAcBOEIMgLwxDRGkNACw7gAAwDUPkRokwYBrCKKQLo1xKhIDWGEMYOhnCGD+AETIaBOCA' + 'BEEYVY0yI1SCKE4IgrghBgEEQEA='; Width := 64; Height := 64; end; end; end |
42 |
How can I specify whether an object can be selected or not
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxGauge1_MouseMoveEvent(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseMoveEvent); begin with AxGauge1 do begin OutputDebugString( get_LayerFromPoint(-1,-1) ); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 12; with Layers.Item[TObject(10)] do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; with Background.ExtraPicture['extra1'] do begin Name := 'Layer1.png'; Left := '32'; Top := '32'; Width := 64; Height := 64; end; with Foreground do begin Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption] := '<sha ;;0>selectable'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft] := TObject(38); Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop] := TObject(-5); end; end; with Layers.Item[TObject(11)] do begin with Background.ExtraPicture['extra2'] do begin Name := 'Layer1.png'; Left := 'width-64'; Top := 'height-84 - 32'; Width := 64; Height := 64; Selectable := False; end; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 25; with Foreground do begin Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption] := '<sha ;;0>not selectable'; Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionAnchor] := TObject(8); Caption[EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop] := 'height-theight/4'; end; end; EndUpdate(); end |
41 |
How do I get the layer/object/picture from the cursor
|
40 |
How can I display a speedometer
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin AxGauge1.Layers.Item['arc'].Clip.Value := AxGauge1.Value; AxGauge1.Layers.Item['noDigit'].Background.ExtraPicture['80'].Name := AxGauge1.FormatABC('`no` + int((value MIN 0 MAX 99)/10) + `.png`',AxGauge1.Value,Nil,Nil); AxGauge1.Layers.Item['noDigit'].Background.ExtraPicture['08'].Name := AxGauge1.FormatABC('`no` + int((value MIN 0 MAX 99) mod 10) + `.png`',AxGauge1.Value,Nil,Nil); end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value + B',AxGauge1.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); BackColor := Color.FromArgb(40,40,40); AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed'; Layers.Count := 6; with Layers.Item[TObject(0)] do begin Key := 'arcBack'; Background.Picture.Name := 'noArcBack.png'; with Clip.Pie do begin StartAngle := 240; SweepAngle := 240; end; end; with Layers.Item[TObject(1)] do begin Key := 'arc'; Background.Picture.Name := 'noArc.png'; with Clip.Pie do begin StartAngle := 240; SweepAngle := 'value/100 * 240'; end; end; with Layers.Item[TObject(2)] do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Key := 'pointer'; Background.Picture.Name := 'noLine.png'; DefaultRotateAngle := 240; RotateAngleToValue := 'value/240 * 100'; ValueToRotateAngle := 'value / 100 * 240'; RotateAngleValid := 'value > 240 ? (value > 300 ? 0 : 240) : value'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; end; with Layers.Item[TObject(3)] do begin Key := 'noBack'; Left := '(width - 55 * 2)/2'; Top := '(height - 94 * 1)/2'; Width := '2 * 45 + 8'; Height := '1 * 94'; Transparency := 90; with Background.ExtraPicture['80'] do begin Name := 'noBack.png'; Left := '-4'; Width := '70'; end; with Background.ExtraPicture['08'] do begin Name := 'noBack.png'; Left := '36'; Width := 70; end; end; with Layers.Item[TObject(4)] do begin Key := 'noDigit'; Left := '(width - 55 * 2)/2'; Top := '(height - 94 * 1)/2'; Width := '2 * 45 + 8'; Height := '1 * 94'; with Background.ExtraPicture['80'] do begin Name := 'no1.png'; Left := '-4'; Width := '70'; end; with Background.ExtraPicture['08'] do begin Name := 'no2.png'; Left := '36'; Width := 70; end; end; with Layers.Item[TObject(5)] do begin Key := 'noCap'; Background.Picture.Name := 'noCap.png'; Transparency := 45; end; AxGauge1.Layers.Item['pointer'].Position := AxGauge1.Layers.Item['noCap'].Position; LayerOfValue := AxGauge1.Layers.Item['pointer'].Index; Value := TObject(56); EndUpdate(); end |
39 |
How can I display LED-numbers
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value MIN 0 MAX 99',Value,Nil,Nil); AxGauge1.Layers.Item['noDigit'].Background.ExtraPicture['80'].Name := AxGauge1.FormatABC('`no` + int((value MIN 0 MAX 99)/10) + `.png`',AxGauge1.Value,Nil,Nil); AxGauge1.Layers.Item['noDigit'].Background.ExtraPicture['08'].Name := AxGauge1.FormatABC('`no` + int((value MIN 0 MAX 99) mod 10) + `.png`',AxGauge1.Value,Nil,Nil); end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value + B',AxGauge1.Layers.Item['noDigit'].Value,TObject(e.delta),Nil); end end; // Timer event - Occurs when the interval elapses. procedure TWinForm1.AxGauge1_Timer(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_TimerEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value = 99 ? 0 : ( value + B )',AxGauge1.Value,TObject(1),Nil); end end; with AxGauge1 do begin BeginUpdate(); AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed'; Layers.Count := 3; with Layers.Item[TObject(1)] do begin Key := 'noBack'; Left := '(width - 55 * 2)/2'; Top := '(height - 94 * 1)/2'; Width := '2 * 45 + 8'; Height := '1 * 94'; Transparency := 90; with Background.ExtraPicture['80'] do begin Name := 'noBack.png'; Left := '-4'; Width := '70'; end; with Background.ExtraPicture['08'] do begin Name := 'noBack.png'; Left := '36'; Width := 70; end; end; with Layers.Item[TObject(2)] do begin Key := 'noDigit'; Left := '(width - 55 * 2)/2'; Top := '(height - 94 * 1)/2'; Width := '2 * 45 + 8'; Height := '1 * 94'; with Background.ExtraPicture['80'] do begin Name := 'no1.png'; Left := '-4'; Width := '70'; end; with Background.ExtraPicture['08'] do begin Name := 'no2.png'; Left := '36'; Width := 70; end; end; LayerOfValue := AxGauge1.Layers.Item['noDigit'].Index; Value := TObject(73); TimerInterval := 100; EndUpdate(); end |
38 |
How can I display a simple knob, to fit the control's client area
with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; PicturesName := '`Layer` + str(value + 1) + `.png`'; LayerAutoSize := -1; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerWidth,'width MAX height'); set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerHeight,'width MAX height'); Layers.Count := 5; with Layers.Item[TObject(4)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; DefaultRotateAngle := -142; end; end |
37 |
How can I display a switch
// Click event - Occurs when the user presses and then releases the left mouse button over the control. procedure TWinForm1.AxGauge1_ClickEvent(sender: System.Object; e: System.EventArgs); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('(value + 1) mod 2',Value,Nil,Nil); end end; // DragEnd event - Occurs once the user ends dragging a layer. procedure TWinForm1.AxGauge1_DragEnd(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEndEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('(value < 24 ? 0 : 1)',TObject(AxGauge1.Layers.Item['knob'].OffsetX),Nil,Nil); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value > 0 ? 1 : 0',TObject(e.delta),Nil,Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch'; Layers.Count := 4; Layers.Item[TObject(0)].Background.Picture.Name := 'background.png'; with Layers.Item[TObject(1)] do begin with Background.Picture do begin Name := 'Indicator_ON.png'; DisplayAs := EXGAUGELib.PictureDisplayEnum.MiddleLeft; end; OffsetXValid := 48; OffsetYValid := 0; end; with Layers.Item[TObject(2)] do begin with Background.Picture do begin Name := 'Indicator_OFF.png'; DisplayAs := EXGAUGELib.PictureDisplayEnum.MiddleRight; end; OffsetXValid := -12; OffsetYValid := 0; end; with Layers.Item[TObject(3)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; Key := 'knob'; with Background.Picture do begin Name := 'knob.png'; DisplayAs := EXGAUGELib.PictureDisplayEnum.MiddleCenter; end; DefaultOffsetY := '9'; DefaultOffsetX := '-5'; OffsetYValid := '0'; ValueToOffsetX := 'value = 0 ? 0 : 48'; OffsetToValue := 'value = 0 ? 0 : 1'; OffsetXValid := '(value MIN 0 MAX 48)'; end; LayerOfValue := AxGauge1.Layers.Item['knob'].Index; Value := TObject(1); end |
36 |
How can I colorize the layer
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (value format ``)',Layers.Item[TObject(4)].Value,Nil,Nil)); end end; // Click event - Occurs when the user presses and then releases the left mouse button over the control. procedure TWinForm1.AxGauge1_ClickEvent(sender: System.Object; e: System.EventArgs); begin with AxGauge1 do begin with Layers.Item[TObject(get_LayerFromPoint(-1,-1))] do begin end; end end; // MouseIn event - Notifies that the cursor enters the layer. procedure TWinForm1.AxGauge1_MouseIn(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseInEvent); begin with AxGauge1 do begin with Layers.Item[TObject(e.layer)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := 0; end; end end; // MouseOut event - Notifies that the cursor exits the layer. procedure TWinForm1.AxGauge1_MouseOut(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseOutEvent); begin with AxGauge1 do begin with Layers.Item[TObject(e.layer)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exBlueChannel] := AxGauge1.DefaultLayer[EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness]; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('A - B',Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerBrightness,TObject(51)); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 6; with Layers.Item[TObject(0)] do begin RotateCenterX := 'lwidth/2-3'; RotateCenterY := 'lheight/2+23'; end; with Layers.Item[TObject(4)] do begin DefaultRotateAngle := -132; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleValid := 'value < 0 ? 0 : (value > 236 ? (value > 300 ? 0 : 236 ) : value)'; ValueToRotateAngle := 'value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86'; RotateAngleToValue := 'value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )'; end; Value := TObject(45); EndUpdate(); end |
35 |
How can I imitate the rotating angle on an unequal scale
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (value format ``)',Layers.Item[TObject(4)].Value,Nil,Nil)); end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('A - B',Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 6; with Layers.Item[TObject(0)] do begin RotateCenterX := 'lwidth/2-3'; RotateCenterY := 'lheight/2+23'; end; with Layers.Item[TObject(4)] do begin DefaultRotateAngle := -132; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleValid := 'value < 0 ? 0 : (value > 236 ? (value > 300 ? 0 : 236 ) : value)'; ValueToRotateAngle := 'value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86'; RotateAngleToValue := 'value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )'; end; Value := TObject(45); EndUpdate(); end |
34 |
How can I rotate more knobs at once
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (value format ``)',Layers.Item[TObject(4)].Value,Nil,Nil)); Layers.Item[TObject(2)].RotateAngle := AxGauge1.Layers.Item[TObject(4)].RotateAngle; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin AxGauge1.Layers.Item[TObject(4)].RotateAngle := AxGauge1.FormatABC('A - B',TObject(AxGauge1.Layers.Item[TObject(4)].RotateAngle),TObject(e.delta),Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 5; with Layers.Item[TObject(4)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; DefaultRotateAngle := -142; end; with Layers.Item[TObject(2)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; end; end |
33 |
How can I clip one layer while other is rotating
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (value format ``)',Layers.Item[TObject(9)].Value,Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotateAngle: <b>` + ( A format `` ) + `°`',TObject(Layers.Item[TObject(9)].RotateAngle),Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(18)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveCenter: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveCenterX),TObject(Layers.Item[TObject(9)].RotamoveCenterY),Nil)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(36)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveOffset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveOffsetX),TObject(Layers.Item[TObject(9)].RotamoveOffsetY),Nil)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(54)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Offset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].OffsetX),TObject(Layers.Item[TObject(9)].OffsetY),Nil)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(72)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`<sha ;;0><font ;12><b>` + ((100 - value) format ``)',AxGauge1.Value,Nil,Nil)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,FormatABC('value - 12',TObject(.Item[TObject(9)].LayerToClientX[TObject(Layers.RotamoveCenterX),TObject(.RotamoveCenterY)]),Nil,Nil)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,FormatABC('value - 36',TObject(.Item[TObject(9)].LayerToClientY[TObject(Layers.RotamoveCenterX),TObject(.RotamoveCenterY)]),Nil,Nil)); Layers.Item[TObject(3)].Clip.Value := TObject(AxGauge1.Layers.Item[TObject(9)].RotateAngle); Layers.Item[TObject(4)].Clip.Value := AxGauge1.Layers.Item[TObject(3)].Clip.Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )" end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := FormatABC('100 - value - B',Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 11; AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; with Layers.Item[TObject(9)] do begin DefaultRotateAngle := -126; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleToValue := '100 - value / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; end; Layers.Item[TObject(3)].Clip.Pie.SweepAngle := 'value'; Layers.Item[TObject(4)].Clip.Pie.SweepAngle := AxGauge1.Layers.Item[TObject(3)].Clip.Pie.SweepAngle; Layers.Item[TObject(9)].Value := TObject(25); EndUpdate(); end |
32 |
Can I move one or more layers at once
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item[TObject(3)].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := AxGauge1.FormatABC('100 - value ',AxGauge1.Value,Nil,Nil); Layers.Item[TObject(4)].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := AxGauge1.Layers.Item[TObject(3)].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel]; set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (100 - value format ``)',Layers.Item[TObject(9)].Value,Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotateAngle: <b>` + ( A format `` ) + `°`',TObject(Layers.Item[TObject(9)].RotateAngle),Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(18)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveCenter: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveCenterX),TObject(Layers.Item[TObject(9)].RotamoveCenterY),Nil)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(36)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveOffset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveOffsetX),TObject(Layers.Item[TObject(9)].RotamoveOffsetY),Nil)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(54)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Offset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].OffsetX),TObject(Layers.Item[TObject(9)].OffsetY),Nil)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(72)); Layers.Item[TObject(10)].RotateAngle := AxGauge1.Layers.Item[TObject(9)].RotateAngle; end end; // DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxGauge1_DblClick(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DblClickEvent); begin with AxGauge1 do begin Value := TObject(0); end end; // Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // ExtraCaption("Clockwise",0) = FormatABC( "` Clockwise: <b>` + ( value != 0 ? `Yes` : `No`) ", DragInfo.Clockwise ) // ExtraCaption("Cumulative",0) = FormatABC( "` CumulativeRotateAngle: <b>` + ( value format `` ) + `°` ", DragInfo.CumulativeRotateAngle ) with AxGauge1 do begin OutputDebugString( e.dragInfo ); set_ExtraCaption('Clockwise',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(90)); set_ExtraCaption('Cumulative',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(108)); end end; // DragEnd event - Occurs once the user ends dragging a layer. procedure TWinForm1.AxGauge1_DragEnd(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEndEvent); begin with AxGauge1 do begin set_ExtraCaption('Clockwise',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,''); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 227 // DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" with AxGauge1 do begin set_ExtraCaption('Clockwise',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,''); set_ExtraCaption('Cumulative',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,''); end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := FormatABC('100 - A - B',AxGauge1.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 11; AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; with Layers.Item[TObject(9)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; DefaultRotateAngle := -126; RotateAngleToValue := '100 - (value ) / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; end; with Layers.Item[TObject(10)] do begin Grayscale := 100; Transparency := 25; DefaultRotateAngle := -69.5; RotateAngleToValue := '100 - (value ) / 360 * 100'; ValueToRotateAngle := '(value 1)/100 * 360'; Background.Picture.Value := 'Highlighted_Layer4.png'; end; with Layers.Item[TObject(3)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 0; end; with Layers.Item[TObject(4)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 0; end; LayerOfValue := 9; Value := TObject(5); EndUpdate(); end |
31 |
How can I rotate a knob by moving ( rotamove )
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item[TObject(3)].Transparency := AxGauge1.Value; Layers.Item[TObject(4)].Transparency := AxGauge1.Value; set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (100 - value format ``)',Layers.Item[TObject(9)].Value,Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotateAngle: <b>` + ( A format `` ) + `°`',TObject(Layers.Item[TObject(9)].RotateAngle),Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(18)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveCenter: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveCenterX),TObject(Layers.Item[TObject(9)].RotamoveCenterY),Nil)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(36)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveOffset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveOffsetX),TObject(Layers.Item[TObject(9)].RotamoveOffsetY),Nil)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(54)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Offset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].OffsetX),TObject(Layers.Item[TObject(9)].OffsetY),Nil)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(72)); end end; // DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxGauge1_DblClick(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DblClickEvent); begin with AxGauge1 do begin Value := TObject(0); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := FormatABC('100 - A - B',AxGauge1.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 11; AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; with Layers.Item[TObject(9)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; DefaultRotateAngle := -126; RotateAngleToValue := '100 - value / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; Background.ExtraPicture['Aka'].Value := 'Highlighted_Layer4.png'; end; with Layers.Item[TObject(3)] do begin Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; end; with Layers.Item[TObject(4)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exRedChannel] := 100; end; Value := TObject(15); EndUpdate(); end |
30 |
How can I display a knob, and displays the current value on it
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Value: <b>` + (100 - value format ``)',Layers.Item[TObject(9)].Value,Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotateAngle: <b>` + ( A format `` ) + `°`',TObject(Layers.Item[TObject(9)].RotateAngle),Nil,Nil)); set_ExtraCaption('RotateAngle',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(18)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveCenter: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveCenterX),TObject(Layers.Item[TObject(9)].RotamoveCenterY),Nil)); set_ExtraCaption('RotamoveCenter',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(36)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` RotamoveOffset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].RotamoveOffsetX),TObject(Layers.Item[TObject(9)].RotamoveOffsetY),Nil)); set_ExtraCaption('RotamoveOffset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(54)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('` Offset: <b> (` + A + `,` + B + `)`',TObject(Layers.Item[TObject(9)].OffsetX),TObject(Layers.Item[TObject(9)].OffsetY),Nil)); set_ExtraCaption('Offset',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,TObject(72)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`<sha ;;0><font ;12><b>` + (100 - value format `0`)',AxGauge1.Value,Nil,Nil)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionLeft,FormatABC('value - 8',TObject(AxGauge1.Layers.Item[TObject(9)].LayerToClientX[TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterX),TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterY)]),Nil,Nil)); set_ExtraCaption('Client',EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaptionTop,FormatABC('value - 26',TObject(AxGauge1.Layers.Item[TObject(9)].LayerToClientY[TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterX),TObject(AxGauge1.Layers.Item[TObject(9)].RotamoveCenterY)]),Nil,Nil)); Layers.Item[TObject(7)].RotateAngle := AxGauge1.Layers.Item[TObject(0)].RotateAngle; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := FormatABC('100 - A - B',AxGauge1.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 11; AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; with Layers.Item[TObject(9)] do begin DefaultRotateAngle := -126; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleToValue := '100 - (value / 360 * 100)'; ValueToRotateAngle := '(value)/100 * 360'; ValueToOffsetX := 'value'; OffsetToValue := 'value'; RotateAngleValid := 'int(value / 360 * 100)/100 * 360'; end; Layers.Item[TObject(3)].Visible := False; Layers.Item[TObject(4)].Visible := False; with Layers.Item[TObject(0)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; end; with Layers.Item[TObject(7)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; end; Value := TObject(25); EndUpdate(); end |
29 |
How can I display an indicator
// MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(1)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',.Layers.Item[TObject(1)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator'; Layers.Count := 3; Layers.Item[TObject(0)].Background.Picture.Name := 'Background.png'; with Layers.Item[TObject(1)] do begin Background.Picture.Name := 'Green_Lights.png'; with Clip do begin with Rectangle do begin Height := '(100 - value)/100 * height'; InverseClip := True; end; Value := TObject(50); end; end; with Layers.Item[TObject(2)] do begin Visible := False; Background.Picture.Name := 'overlay_top_layer.png'; end; end |
28 |
How can I display a gauge
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item[TObject(1)].Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exGreenChannel] := AxGauge1.Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('A - B',AxGauge1.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin BeginUpdate(); BackColor := Color.FromArgb(217,217,217); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage'; Layers.Count := 2; AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless; with Layers.Item[TObject(0)] do begin RotateCenterY := 'lheight/2 + 78'; Background.Picture.Name := 'Guage_Background.png'; end; with Layers.Item[TObject(1)] do begin OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'Guage_Needle.png'; RotateAngleValid := 'value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))'; RotateAngleToValue := 'value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50'; ValueToRotateAngle := 'value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90'; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Brightness[EXGAUGELib.ColorAdjustmentChannelEnum.exAllChannels] := 0; end; Value := TObject(78); EndUpdate(); end |
27 |
How can I display a clock (rotate,wolf)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['sec'].Value := AxGauge1.Value; Layers.Item['min'].Value := AxGauge1.Value; Layers.Item['hour'].Value := AxGauge1.Value; Layers.Item['range'].Clip.Value := AxGauge1.Layers.Item['pointer'].Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = -1 end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin AxGauge1.Layers.Item['pointer'].Value := AxGauge1.FormatABC('A - B',AxGauge1.Layers.Item['pointer'].Value,TObject(e.delta),Nil); end end; // Timer event - Occurs when the interval elapses. procedure TWinForm1.AxGauge1_Timer(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_TimerEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC(' date(`now`)',Nil,Nil,Nil); AxGauge1.Layers.Item['pointer'].Value := AxGauge1.FormatABC('sin((value/100 mod 100)/100 * 2 * asin(1)) * 100',TObject(e.tickCount),Nil,Nil); Layers.Item['range'].Clip.Value := AxGauge1.Layers.Item['pointer'].Value; end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 9; with Layers.Item[TObject(0)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Background.Picture.Name := 'Back.png'; end; with Layers.Item[TObject(1)] do begin Key := 'scale'; DefaultOffsetX := -90; DefaultOffsetY := -150; Background.Picture.Name := 'Scale.png'; RotateCenterLayer := 1; RotateCenterX := '(lwidth+181)/2'; RotateCenterY := '(lheight+232)/2'; end; with Layers.Item[TObject(2)] do begin Key := 'range'; DefaultOffsetX := AxGauge1.Layers.Item['scale'].DefaultOffsetX; DefaultOffsetY := AxGauge1.Layers.Item['scale'].DefaultOffsetY; RotateCenterLayer := AxGauge1.Layers.Item['scale'].Index; with Background.Picture do begin Name := 'ScalePointerArc.png'; end; RotateCenterLayer := AxGauge1.Layers.Item['scale'].Index; with Clip.Pie do begin RadiusX := 100; RadiusY := 100; CenterX := AxGauge1.Layers.Item['scale'].RotateCenterX; CenterY := AxGauge1.Layers.Item['scale'].RotateCenterY; StartAngle := -148; SweepAngle := 'value/100 * 300'; end; end; with Layers.Item[TObject(3)] do begin Key := 'pointer'; DefaultOffsetX := AxGauge1.Layers.Item['scale'].DefaultOffsetX; DefaultOffsetY := AxGauge1.Layers.Item['scale'].DefaultOffsetY; with Background.Picture do begin Name := 'ScalePointer.png'; end; RotateCenterLayer := AxGauge1.Layers.Item['scale'].Index; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; DefaultRotateAngle := -148; RotateAngleValid := 'value > 300 ? (value > 330 ? 0 : 300) : value'; RotateAngleToValue := 'value / 300 * 100'; ValueToRotateAngle := 'value /100 * 300'; end; with Layers.Item[TObject(4)] do begin Key := 'bolt'; DefaultOffsetX := AxGauge1.Layers.Item['scale'].DefaultOffsetX; DefaultOffsetY := AxGauge1.Layers.Item['scale'].DefaultOffsetY; with Background.Picture do begin Name := 'Bolt.png'; end; end; with Layers.Item[TObject(5)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'sec'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'second-hand.png'; ValueToRotateAngle := '((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f' + 'loor(=:1)) * 60 )) - floor(=:2) ) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(6)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'min'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'Minute.png'; ValueToRotateAngle := '((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=' + ':1)) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(7)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'hour'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'Hour.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; with Layers.Item[TObject(8)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'front'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'front.png'; end; LayerOfValue := AxGauge1.Layers.Item['hour'].Index; Value := FormatABC('date(`now`)',Nil,Nil,Nil); TimerInterval := 100; end |
26 |
How can I display a clock (rotate,vintage)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['sec'].Value := AxGauge1.Value; Layers.Item['min'].Value := AxGauge1.Value; Layers.Item['hour'].Value := AxGauge1.Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin AxGauge1.Value := AxGauge1.FormatABC('A - 1/24/60/60*B',AxGauge1.Value,TObject(e.delta),Nil); end end; // Timer event - Occurs when the interval elapses. procedure TWinForm1.AxGauge1_Timer(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_TimerEvent); begin with AxGauge1 do begin Value := FormatABC('value + 1/24/60/60',Value,Nil,Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 5; with Layers.Item[TObject(0)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Background.Picture.Name := 'Back.png'; end; with Layers.Item[TObject(1)] do begin Position := 3; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'sec'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'second-hand.png'; ValueToRotateAngle := '((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f' + 'loor(=:1)) * 60 )) - floor(=:2) ) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(2)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 2; Key := 'min'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'Minute.png'; ValueToRotateAngle := '((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=' + ':1)) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(3)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 1; Key := 'hour'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'Hour.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; with Layers.Item[TObject(4)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 1; Key := 'front'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'front.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; LayerOfValue := 3; Value := FormatABC('date(`now`)',Nil,Nil,Nil); TimerInterval := 1000; end |
25 |
How can I display a clock (rotate,london)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['sec'].Value := AxGauge1.Value; Layers.Item['min'].Value := AxGauge1.Value; Layers.Item['hour'].Value := AxGauge1.Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin AxGauge1.Value := AxGauge1.FormatABC('A - 1/24/60/60*B',AxGauge1.Value,TObject(e.delta),Nil); end end; // Timer event - Occurs when the interval elapses. procedure TWinForm1.AxGauge1_Timer(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_TimerEvent); begin with AxGauge1 do begin Value := AxGauge1.FormatABC('value + 1/24/60/60',Value,Nil,Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 6; with Layers.Item[TObject(0)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Background.Picture.Name := 'Back.png'; end; with Layers.Item[TObject(1)] do begin Position := 3; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'sec'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; RotateCenterLayer := 1; Background.Picture.Name := 'second-hand.png'; ValueToRotateAngle := '((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f' + 'loor(=:1)) * 60 )) - floor(=:2) ) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(2)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 2; RotateCenterLayer := 2; Key := 'min'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'Minute.png'; ValueToRotateAngle := '((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=' + ':1)) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(3)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 1; Key := 'hour'; RotateCenterLayer := 3; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'Hour.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; with Layers.Item[TObject(4)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Position := 1; Key := 'front'; RotateCenterLayer := 4; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'front.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; with Layers.Item[TObject(5)] do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; Key := 'bolt'; RotateCenterLayer := 5; Background.Picture.Name := 'Bolt.png'; end; LayerOfValue := AxGauge1.Layers.Item['hour'].Index; Value := AxGauge1.FormatABC('date(`now`)',Nil,Nil,Nil); TimerInterval := 1000; end |
24 |
How can I display a clock (rotate)
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['sec'].Value := AxGauge1.Value; Layers.Item['min'].Value := AxGauge1.Value; Layers.Item['hour'].Value := AxGauge1.Value; end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin AxGauge1.Value := AxGauge1.FormatABC('A - 1/24/60/60*B',AxGauge1.Value,TObject(e.delta),Nil); end end; // Timer event - Occurs when the interval elapses. procedure TWinForm1.AxGauge1_Timer(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_TimerEvent); begin with AxGauge1 do begin Value := FormatABC('value + 1/24/60/60',Value,Nil,Nil); end end; with AxGauge1 do begin PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock'; set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerRotateType,TObject(2)); Layers.Count := 4; with Layers.Item[TObject(0)] do begin Background.Picture.Name := 'vista_clock.png'; end; with Layers.Item[TObject(1)] do begin Position := 3; Key := 'sec'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'second-hand.png'; ValueToRotateAngle := '((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - f' + 'loor(=:1)) * 60 )) - floor(=:2) ) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(2)] do begin Position := 2; Key := 'min'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Selectable := False; Background.Picture.Name := 'Minute.png'; ValueToRotateAngle := '((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 )) - floor(=' + ':1)) * 360'; RotateAngleToValue := 'value / 360 / 24 / 60'; end; with Layers.Item[TObject(3)] do begin Position := 1; Key := 'hour'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; Background.Picture.Name := 'Hour.png'; ValueToRotateAngle := '2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )'; RotateAngleToValue := 'value / 360 * 0.5'; end; LayerOfValue := 3; Value := FormatABC('date(`now`)',Nil,Nil,Nil); TimerInterval := 1000; end |
23 |
How can I clip as a triangle
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; with Clip do begin with Polygon do begin Points := 3; X[0] := 0; Y[0] := 'height'; X[1] := 'width/2'; Y[1] := 'value/100*width'; X[2] := 'width'; Y[2] := 'height'; InverseClip := True; end; Value := TObject(50); end; end; end |
22 |
How can I limit the rotation from 0 to 360 degree, while dragging
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 483 // DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)" end; with AxGauge1 do begin with Layers.Add('back') do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; with Background.Picture do begin Value := 'c:\exontrol\images\card.png'; Left := '(width-pwidth)/2'; Top := '(height-pheight)/2'; Width := 'pwidth'; Height := 'pheight'; end; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateAngle := -45; end; end |
21 |
How can I clip as a pie
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("value + B/360 * 100", Me.Layers(0).UserData, DragInfo.DeltaAngle ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = -1 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Left := '(width-128)/2'; Top := '(height-128)/2'; Height := 128; Width := 128; Background.Color.Value := $ff00; with Clip do begin with Pie do begin InverseClip := True; StartAngle := 0; SweepAngle := 'value/100*360'; end; Value := TObject(15); end; end; end |
20 |
How can I use a picture to clip the layer
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin Layers.Item['Clip'].Clip.Value := TObject(AxGauge1.Layers.Item['Thumb'].RotateAngle); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1'; PicturesName := '`Layer` + int(value + 1) + `.png`'; Layers.Count := 5; with Layers.Item[TObject(4)] do begin Key := 'Thumb'; DefaultRotateAngle := -141; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; end; with Layers.Item[TObject(1)] do begin Key := 'Clip'; with Clip do begin Pie.SweepAngle := 'value'; with Picture do begin Name := AxGauge1.Layers.Item['Clip'].Background.Picture.Name; AlphaTo := '128'; end; end; end; Layers.Item['Thumb'].RotateAngle := 90; EndUpdate(); end |
19 |
How do I clip a circle/ellipse
|
18 |
What InverseClip does
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Left := '(width-128)/2'; Top := '(height-128)/2'; Height := 128; Width := 128; Background.Color.Value := $ff00; with Clip do begin with RoundRectangle do begin Width := 'value/100 * width'; RoundRadiusX := 'width/8'; RoundRadiusY := 'height/8'; InverseClip := True; end; Value := TObject(50); end; end; end |
17 |
How do I clip as rectangle (round), from left to right
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Left := '(width-128)/2'; Top := '(height-128)/2'; Height := 128; Width := 128; Background.Color.Value := $ff00; with Clip do begin with RoundRectangle do begin Width := 'value/100 * width'; RoundRadiusX := 'width/8'; RoundRadiusY := 'height/8'; end; Value := TObject(50); end; end; end |
16 |
How do I clip as rectangle, from bottom to top
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; with Clip do begin with Rectangle do begin Height := 'value/100 * height'; InverseClip := True; end; Value := TObject(50); end; end; end |
15 |
How do I clip as rectangle, from top to bottom
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaY ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; with Clip do begin Rectangle.Height := 'value/100 * height'; Value := TObject(50); end; end; end |
14 |
How do I clip as rectangle, from right to left
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; with Clip do begin with Rectangle do begin Width := 'value/100 * width'; InverseClip := True; end; Value := TObject(50); end; end; end |
13 |
How do I clip as rectangle, from left to right
// Drag event - Notifies that the user drags the layer. procedure TWinForm1.AxGauge1_Drag(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragEvent); begin // Me.Layers(0).Clip.Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Me.Layers(0).UserData, DragInfo.DeltaX ) end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug= 287 with AxGauge1 do begin with Layers.Item[TObject(0)] do begin UserData := Clip.Value; end; end end; // MouseWheel event - Occurs when the mouse wheel moves while the control has focus procedure TWinForm1.AxGauge1_MouseWheel(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseWheelEvent); begin with AxGauge1 do begin Layers.Item[TObject(0)].Clip.Value := AxGauge1.FormatABC('(value + B) MIN 0 MAX 100',AxGauge1.Layers.Item[TObject(0)].Clip.Value,TObject(e.delta),Nil); end end; with AxGauge1 do begin Layers.Count := 1; with Layers.Item[TObject(0)] do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; with Clip do begin Rectangle.Width := 'value/100 * width'; Value := TObject(50); end; end; end |
12 |
How can I associate a value to rotation angle
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`Value: <b>` + (value format ``) ',Layers.Item[TObject(0)].Value,Nil,Nil)); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 483 end; with AxGauge1 do begin with Layers.Add('back') do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; with Background.Picture do begin Value := 'c:\exontrol\images\card.png'; Left := '(width-pwidth)/2'; Top := '(height-pheight)/2'; Width := 'pwidth'; Height := 'pheight'; end; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; DefaultRotateAngle := 45; RotateCenterY := 'lheight/2 + 32'; RotateCenterX := 'lwidth/2 + 32'; RotateAngleToValue := 'value/360 * 100'; ValueToRotateAngle := 'value / 100 * 360'; Value := TObject(50); end; end |
11 |
How can I associate a value to vertical offset
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`Value: <b>` + (value format ``)',Layers.Item[TObject(0)].Value,Nil,Nil)); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 287 end; with AxGauge1 do begin with Layers.Add('back') do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; DefaultOffsetY := -100; OffsetYValid := 'value MIN 0 MAX 200'; OffsetXValid := 0; OffsetToValue := 'offsety /200 * 100'; ValueToOffsetY := 'value / 100 * 200'; Value := TObject(50); end; end |
10 |
How can I associate a value to horizontal offset
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`Value: <b>` + (value format ``)',Layers.Item[TObject(0)].Value,Nil,Nil)); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 287 end; with AxGauge1 do begin with Layers.Add('back') do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; DefaultOffsetX := -100; OffsetXValid := 'value MIN 0 MAX 200'; OffsetYValid := 0; OffsetToValue := 'offsetx /200 * 100'; ValueToOffsetX := 'value / 100 * 200'; Value := TObject(50); end; end |
9 |
How can I display the current angle
// Change event - Occurs when the layer's value is changed. procedure TWinForm1.AxGauge1_Change(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_ChangeEvent); begin with AxGauge1 do begin set_Caption(EXGAUGELib.PropertyLayerCaptionEnum.exLayerCaption,FormatABC('`Angle: <b>` + (value format ``) + `°`',TObject(Layers.Item[TObject(0)].RotateAngle),Nil,Nil)); end end; // DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 483 end; with AxGauge1 do begin with Layers.Add('back') do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; with Background.Picture do begin Value := 'c:\exontrol\images\card.png'; Left := '(width-pwidth)/2'; Top := '(height-pheight)/2'; Width := 'pwidth'; Height := 'pheight'; end; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateAngleValid := '(value > 180 ? value - 360 : value) MIN 15 MAX 65'; end; end |
8 |
How can I limit the rotation angle
|
7 |
Can I specify a different center while rotating
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 483 end; with AxGauge1 do begin with Layers.Add('back') do begin RotateType := EXGAUGELib.RotateTypeEnum.exRotateBilinearInterpolation; Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; with Background.Picture do begin Value := 'c:\exontrol\images\card.png'; Left := '(width-pwidth)/2'; Top := '(height-pheight)/2'; Width := 'pwidth'; Height := 'pheight'; end; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateAngle := -45; RotateCenterY := 'lheight/2 + 32'; RotateCenterX := 'lwidth/2 + 32'; end; end |
6 |
How can I rotate a layer, without cutting off the picture
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 483 end; with AxGauge1 do begin with Layers.Add('back') do begin Left := '(width-512)/2'; Top := '(height-512)/2'; Height := 512; Width := 512; with Background.Picture do begin Value := 'c:\exontrol\images\card.png'; Left := '(width-pwidth)/2'; Top := '(height-pheight)/2'; Width := 'pwidth'; Height := 'pheight'; end; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotate; RotateAngle := -45; end; end |
5 |
How can I rotate a layer
|
4 |
Is there any way to debug the layer while moving
// DragStart event - Occurs once the user starts dragging a layer. procedure TWinForm1.AxGauge1_DragStart(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_DragStartEvent); begin // DragInfo.Debug = 287 end; with AxGauge1 do begin with Layers.Add('back') do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; end; end |
3 |
How do I specify where to move the layer, while dragging
with AxGauge1 do begin with Layers.Add('back') do begin Background.Picture.Value := 'c:\exontrol\images\card.png'; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoMove; OffsetXValid := 'int(value / 64) * 64'; OffsetYValid := 'int(value / 64) * 64'; end; end |
2 |
How can I add layers to the control
|
1 |
How can I add layers to the control
|