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

求助:自制控件的问题?

[复制链接]
secrety_925 该用户已被删除
发表于 2006-10-30 05:29:49 | 显示全部楼层 |阅读模式
自制控件时,Control,Type def,Strict type def三者中怎么选择? 它们有什么区别?怎么正确使用呢?
发表于 2006-10-30 17:48:12 | 显示全部楼层
Type def这个做的控件,每一个地方放置的可以修改的参数较多,比如值的范围之类的!Strict type def这个控制得比较严格,可供修改的东西并不多!
回复 顶

使用道具 举报

发表于 2006-10-30 17:49:07 | 显示全部楼层
<p>更详细的原文如下:</p><p>A <b>Type Definition</b> can have a different name, description, default value, size, color, or style of control (such as a knob instead of a slide), as long as the <u>data type</u> matches the master copy of the control. A type definition only identifies the correct “type” for each instance of a custom control. The “type” does not include things like data range for a numeric controls, or item names in a ring control. So if you change the data range on a numeric control or an item name on a ring control that are part of a type definition control, it will <u>not</u> change these properties on all instances of the control. However, if you change the item name in a type definition for an enumerated type (enum), all instances change as well, since the item name is part of the “type” for an enum. You can also use normal property nodes with type definitions as you would with a non-custom control.<br/><br/>A <b>Strict Type Definition</b> forces almost everything about the control to be identical, including its size, color, and appearance. Strict type definitions are more restrictive and unlike general type definitions, they define other values, such as range checking on numeric controls and item names on ring controls. The only flexibility to a strict type definition is the name, description, and default value which all can be different for separate instances of the same control. The only properties available for a strict type definition control are those that affect the appearance of the control such as Visible, Disabled, Key Focus, Blinking, Position, and Bounds. For example, if you have a strict type definition which is made up of a cluster of various controls, properties for each individual control would not be available. Only appearance properties for the overall custom control would be allowed.<br/><br/><u>Additional Note:</u> Most programmers use type definitions and strict type definitions to create a custom control using a cluster of many controls. This way, if they want to later add a new control and pass a new value to every subVI, adding the new control to the custom control can easily accomplish this. This saves the programmer from having to add the new control to each subVI’s front panel and making new wires and terminals. <br/></p>
回复 顶

使用道具 举报

发表于 2006-10-30 20:59:04 | 显示全部楼层
<p>Type def好像是说通过此定义的控件在调用时若有几个地方调用,修改一处的类型几处都会修改,</p><p>Strict type def更加严格的定义,值格式保持一样</p>
回复 顶

使用道具 举报

secrety_925 该用户已被删除
 楼主| 发表于 2006-10-31 02:45:10 | 显示全部楼层
回复 顶

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-29 16:36 , Processed in 0.029327 second(s), 10 queries , Gzip On, File On.

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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