许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  ANSA二次开发:BCGUI Examples示例讲解

ANSA二次开发:BCGUI Examples示例讲解

阅读数 4
点赞 0
article_banner

The first example is the code implementation of the pseudocode as presented in the previous section:

第一个例子是伪代码的代码实现,如前一节所述:

In order for a widget to be displayed, BCShow must be called for it. This will trigger a recursive call for the widget’s children as well. In the example above, only one BCShow call for ‘BCWindow’ ‘w’ is enough to show everything that it contains. The ‘BCOnExitDestroy’ option used in ‘BCWindowCreate’ means that when the window closes (by pressing escape , return or the[x] button) it will be destroyed. The other available option is the ‘BCOnExitHide’ but it is strongly recommended to avoid using it, since a wrong usage may lead to memory leaks.

为了显示小部件,必须为其调用BCShow。这也将触发对小部件的子级的递归调用。在上面的示例中,只有一个对“BCWindow”“w”的BCShow调用就足以显示它包含的所有内容。“BCWindowCreate”中使用的“BCOnExitDestroy”选项意味着当窗口关闭时(按escape、return或[x]按钮),它将被销毁。另一个可用的选项是“BCOnExitHide”,但强烈建议不要使用它,因为错误的使用可能会导致内存泄漏。

Note

注意

A ‘BCWindow’ is good to have a unique name. Any information about the window (e.g size, position, values of its widgets etc) will be stored in ANSA.xml under this name. However, it must not be confused with the name of the title bar that can be always changed by using the BCSetCaption.

“BCWindow”最好有一个唯一的名称。关于窗口的任何信息(例如大小、位置、窗口小部件的值等)都将存储在安莎.xml以这个名字。但是,不能将它与标题栏的名称混淆,而标题栏的名称可以通过使用BCSetCaption来更改。

In the previous example a ‘BCWindow’ with 2 “dummy” buttons was created, i.e. on button click no operation has been defined. This is where the user needs to define callback functions, i.e. functions that will be called when a user interacts with widgets or items.

在前面的示例中,创建了一个带有2个“虚拟”按钮的“BCWindow”,即单击按钮时未定义任何操作。这是用户需要定义回调函数的地方,即当用户与小部件或项目交互时将调用的函数。

Callback functions are defined as normal script functions and their name is passed as a string argument to the appropriate BCGUI functions, followed by a user argument of any data type ( float  , string, integer, matrix etc).Help about BCG
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空