Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change to/from value pairs style programmaticly?

I've tried to find this for quite a while now but I just cannot seem to find a new to change from Numeric to Value Pairs mode (Style) programmaticly. Anyone know how to do it?
0 Kudos
Message 1 of 2
(3,021 Views)
There is not a way to change the mode explicitly. You add ValuePairs to the Axis to show the value pairs. You set the major divisions interval to 0 to hide the major divisions.

The following code demonstrates how you toggle between the two.

Private Sub ShowDivisions_Click()
CWGraph1.Axes(1).ValuePairs.RemoveAll
CWGraph1.Axes(1).Ticks.MajorUnitsInterval = 2
End Sub

Private Sub ShowValuePairs_Click()
CWGraph1.Axes(1).Ticks.MajorUnitsInterval = 0

Dim valuePair As CWValuePair
Set valuePair = CWGraph1.Axes(1).ValuePairs.Add()
valuePair.Name = "A"
valuePair.Value = 0
Set valuePair = CWGraph1.Axes(1).ValuePairs.Add()
valuePair.Name = "B"
valuePair.Value = 5
Set valuePair = CWGraph1.Axes(1).ValuePairs
.Add()
valuePair.Name = "C"
valuePair.Value = 10
End Sub

I hope this helps.

David Rohacek
National Instruments
0 Kudos
Message 2 of 2
(3,021 Views)