CNiAxis::ValuePairs

CNi

Class
CNiAxis::
ValuePairs
Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: TicksNext page: Visible    
Public Data Item Declared in:
NiAxis.h

'Declaration' icon -- Shortcut to top of page. Declaration

CNiValuePairs ValuePairs;

'Description' icon -- Shortcut to top of page. Description

Gets a collection of ValuePair objects associated with the control.

A ValuePair object is a label and a value. A slide control with text labels such as "Off", "Slow", and "Fast" uses CNiValuePairs to define the labels. For example, use a CNiValuePair object to add a text label like "BoilingPoint" to a numeric axis at the value 212.

Note that you must initialize a CNiValuePair object from an existing object. For example:

   CNiValuePair pair = axis.ValuePairs.Add();
   pair.Name = _T("ValuePair01");

Or:

   CNiValuePair pair = axis.ValuePairs.Item(1);
   pair.Name = _T("ValuePair01");

If you do not initialize a CNiValuePair object from an existing object, a CNiObjectNotInUsableState exception will be thrown when you attempt to manipulate the instance of the CNiValuePair. For example:

   CNiValuePair pair;

// This will throw a CNiObjectNotInUsableState exception because // the CNiValuePair object was not initialized from an existing // object. pair.Name = _T("ValuePair01");

'See Also' icon -- Shortcut to top of page. See Also