cpubbs论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

LabVIEW+单片机学习套件全套教程资料下载[免费]LabVIEW论坛精华列表贴USB0816数据采集卡《LabVIEW宝典》
LabWindows/CVI论坛精华贴NET0816以太网数据采集卡RC0210远程设备授权系统 关闭关停锁定打开设备 户外分布式数据采集
NET1624低速高精度以太网数据采集卡WIFI0824SD无线WIFI网络数据采集卡脱机运行 SD存储 小尺寸微型 串口采集远程采集 安卓 手持移动采集 纪录仪
查看: 2361|回复: 8

求助!请问各位师兄graph视区的缩放和移动用代码怎么实现?

[复制链接]
发表于 2008-5-22 10:56:14 | 显示全部楼层 |阅读模式
发表于 2008-5-23 22:30:30 | 显示全部楼层
SetCtrlAttribute (, , ATTR_ZOOM_STYLE, );
兄弟试试用这个属性设置的控件!
 楼主| 发表于 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轴坐标,进而实现看似移动和缩放的效果。
发表于 2008-5-28 12:18:02 | 显示全部楼层
好样的兄弟!
发表于 2008-5-30 22:04:49 | 显示全部楼层
8.5 里控件有增强的zoom 功能
发表于 2009-7-23 14:30:02 | 显示全部楼层
发表于 2010-8-23 15:24:47 | 显示全部楼层
本身Graph控件就带有这个功能的,在graph palette中!
发表于 2010-7-29 20:06:22 | 显示全部楼层
发表于 2011-3-15 09:40:28 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|cpubbs论坛. ( 粤ICP备09171248号 )

GMT+8, 2025-5-3 22:58 , Processed in 1.042709 second(s), 9 queries , Gzip On, File On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表