Contents
TwSetParam (function)
Description
This function modifies the value(s) of a bar or variable parameter. Parameters define the behavior of bars and vars and may be set by functions TwDefine or TwAddVar* using a definition string. Parametersbar
Bar identifier. If the parameter to modify is global, varName
If the parameter is directly related to a bar,
Otherwise, paramNameName of the parameter. This is one of the key words listed in the bar parameters page if the parameter is directly related to a bar, or listed in the var parameters page if the parameter is related to a variable. paramValueType
Type of the data pointed by inValues. Should be one of the constants defined by TwParamValueType: inValueCountDepending on the parameter, one or more values may be required to modify it. For instance, a state parameter requires one value while a rgb-color parameter requires 3 values.
If the parameter value is a string, inValues
Pointer to the new parameter value(s). If there is more than one value, the values must be stored consecutively as an array starting at the address pointed by Examples// set a variable 'step' parameter "varname", "step"// fold a group "groupname", "opened"// set arrow color of a direction variable "varname", "arrowcolor"// set a key shortcut "ALT+a"; TwSetParam(bar, "varname", "keyincr"// set a bar values width // pixels "valueswidth"// set global icon alignment "horizontal""iconalign" Return value
See also |