int ScrollBar_ConvertFromGraph (int panelHandle, int graphID, CtrlCallbackPtr callbackFunction, void *callbackData);
This function converts a graph control created in the User Interface Editor to a scroll bar. The position, size and color of the graph are retained in the scroll bar. The defined constant (located in the UIR header file) which was assigned to the graph control in the User Interface Editor can then be used in subsequent function calls.
Input | |||||||||||||||||||||||||||||||||||
Name | Type | Description | |||||||||||||||||||||||||||||||||
panelHandle | integer | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
|||||||||||||||||||||||||||||||||
graphID | integer | The defined constant (located in the UIR header file) which was assigned to the graph control in the User Interface Editor. | |||||||||||||||||||||||||||||||||
callbackFunction | CtrlCallbackPtr | The name of the user function that processes the scroll bar callback. This event function (type CtrlCallbackPtr) takes the form: int CVICALLBACK ScrollBarCallback(int panel, int scrollBar, int event, void *callbackData, int eventData1, int eventData2); If the graph control being converted has a callback associated with it, pass 0 to use this callback function as the scrollbar's callback. The event function is passed the Panel Handle and Scroll Bar ID of the scroll bar generating the event. The Event type as well as Callback data defined by the user is passed to the event function as well. The new value of the scroll bar is also passed in the eventData1 parameter, and a pointer to this value is passed in the eventData2 parameter. The following is a list of each scroll bar action, the fired scroll bar event and a description of changes to the scroll bar.
Holding down the mouse button or the key causes any of the first four events to continue firing. The eventData2 parameter can be cast to an integer pointer (int *) and then used to modify the scroll bar value in the callback function. The scroll bar thumb is moved to the modified location immediately after exiting the callback. |
|||||||||||||||||||||||||||||||||
callbackData | void * | A pointer to user-defined data passed to the event function. |
Name | Type | Description | |||||||||||||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|