|

楼主 |
发表于 2008-5-28 11:30:30
|
显示全部楼层
找到解决办法了!
谢谢版主的帮忙。
我试了版主说的那条语句,不过它只能设置graph控件的zoom Style属性,
后来我从帮助文件中找到了SetAxisScalingMode (int panelHandle, int controlID, int axis, int axisScaling, double min, double max)函数;
int SetAxisScalingMode (int panelHandle, int controlID, int axis, int axisScaling, double min, double max);
PurposeSets the scaling mode and the range of a graph axis or the scaling mode and the range of a y-axis of a strip chart.
This function is not valid for the x-axis of a strip chart. To set the x-offset and x-increment for a strip chart, use the SetCtrlAttribute function with the ATTR_XAXIS_OFFSET and ATTR_XAXIS_GAIN attributes.
When you call this function on a digital graph, LabWindows/CVI rounds the min and max values to the closest integer value.
可以用它来设置graph控件视口左右端的X轴坐标,进而实现看似移动和缩放的效果。 |
|