Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

how to programmatically change color of arc in cwknob

trying to change color of arc in cwknob control conditonally
0 Kudos
Message 1 of 3
(3,299 Views)
I'm not entirely sure what part of the control you are referring to by "arc". Can you elaborate?

If you mean the (by default) black line that the pointer points to when you choose a meter style and to which the major and minor ticks are connected, you can change its color with the following code:

CWKnob1.Axis.Ticks.MajorTickColor = vbYellow

If you looked for and didn't find the property you need, I suggest you check out the properties of the Axis subobject of the knob. People frequently overlook this important subobject of the knob and slide.

In general, if you are able to configure a property on any property page except the Advanced property page, you should be able to configure it programmatically.

If my suggestions above don't get the job done
for you, you could take screen capture of the control, drop it in Paint, circle the portion of the control you want to configure, and attach it to a response to this post.
0 Kudos
Message 2 of 3
(3,299 Views)
yes,this works
0 Kudos
Message 3 of 3
(3,299 Views)