| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 322 人关注过本帖
标题:[求助][求助]来个人瞅瞅拉,能解决就解决,不行能不能也给个有说服力的说法 ...
只看楼主 加入收藏
qgy12
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-10-31
收藏
 问题点数:0 回复次数:0 
[求助][求助]来个人瞅瞅拉,能解决就解决,不行能不能也给个有说服力的说法啊?

我的Q:22176822 急等!!!
用openuserobject()创建的对象怎样加载事件?
比如已经定义好一个UO是BUTTON的,在窗口上用openuserobject()创建一个或N个新BUTTON,如何在这些新BUTTON上用脚本定义事件?PB是否可以这样做?
我的要求:
1、不用问做什么用或用在什么上,因为不论我怎么用,我的需求是能否用脚本定义(或捕获)动态控件的事件,仅此而已;
2、不用提议把例如clicked事件的脚本写在UO上,让新BUTTON具有UO的执行功能,需求是新BUTTON的个数在生成前并不知道是否改变,写在UO哩也没有用;
3、先不考虑API;
4、听说PFC哩有相关例程,但我没有找着;

其实我问的就是PB哩是否有用脚本定义控件的事件的功能。
如:
forward
global type w_aa from window
end type
type cb_1 from commandbutton within w_aa
end type
end forward

global type w_aa from window
integer width = 1563
integer height = 692
boolean titlebar = true
string title = "TEST"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_1 cb_1
end type
global w_aa w_aa

on w_aa.create
this.cb_1=create cb_1
this.Control[]={this.cb_1}
end on

on w_aa.destroy
destroy(this.cb_1)
end on

type cb_1 from commandbutton within w_aa
integer x = 475
integer y = 100
integer width = 517
integer height = 160
integer taborder = 10
integer textsize = -14
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "关闭"
end type

event clicked;close(parent)
end event

以上是一个窗口的源,其中大部分基本可用脚本描述,但最后两行怎么用脚本表达??

搜索更多相关主题的帖子: 瞅瞅 说服力 
2007-11-01 10:32
快速回复:[求助][求助]来个人瞅瞅拉,能解决就解决,不行能不能也给个有说服力的 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015299 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved