④ 続いて2つ目のゲージも次のプロパティを設定します。これで、水色の背景を持った黄色いポインタのゲージが出来上がります。
水色の背景を持った黄色いポインタのゲージが出来上がる
C1LinearGauge
|
プロパティ |
設定値 |
|
Height |
100px |
TickMajor
|
プロパティ |
設定値 |
|
Foctor |
8 |
|
Visible |
True |
|
Offset |
-9 |
|
Interval |
10 |
|
TickStyle |
Fill Color |
#6600FF |
TickMinor
|
プロパティ |
設定値 |
|
Visible |
True |
|
Offset |
-10 |
|
Interval |
2 |
|
Factor |
7 |
Pointer
|
プロパティ |
設定値 |
|
Length |
0.5 |
|
Width |
8 |
|
Offuset |
0 |
|
Pointer Style |
Fill Color |
#99FF66 |
Face
|
プロパティ |
設定値 |
|
FaceStyle |
Fill Color |
#66FFFF |
⑤ コントロールのゲージにもレンジを設定します。ただし、レンジは2つ設定します。
プロパティウィンドウの「Ranges」プロパティの値欄をクリックし、GaugelRangeコレクションエディタを表示します。「追加」ボタンを2回クリックして、2つのGaugelRangeオブジェクトを追加します。
それぞれのレンジは、次のプロパティを設定します。これで、10から20と、60から100までの2つのレンジが設定されます。
10から20と60から100までの2つのレンジが設定される
最初のレンジ
|
プロパティ |
設定値 |
|
EndDistance |
0.85 |
|
EndValue |
20 |
|
EndWidth |
0.5 |
|
StartDistance |
0.85 |
|
StartValue |
10 |
|
StartWidth |
10 |
|
Width |
|
0.1 |
|
RangeStyle |
Fill |
ColorBegin |
#CC99FF |
|
ColorEnd |
#9933FF |
|
LinearGrandientAngle |
90 |
|
Type |
LinearGrandient |
2番目のレンジ
|
プロパティ |
設定値 |
|
EndDistance |
0.85 |
|
EndValue |
100 |
|
EndWidth |
0.5 |
|
StartDistance |
0.85 |
|
StartValue |
60 |
|
StartWidth |
0.5 |
|
Widh |
0.1 |
|
RangeStyle |
Fill |
ColorBegin |
#CC99FF |
|
ColorEnd |
#9933FF |
|
LinearGrandientAngle |
90 |
|
Type |
LinearGrandient |
⑥ これでゲージが出来上がりました。あとは、コードからグリッドのデータを使用して、再度ゲージを設定しなおします。