[英]Creating a toggle box dynamically on a window
I'm taking a toggle box name from a text file And then creating a toggle box dynamically on window.我从文本文件中获取切换框名称,然后在 window 上动态创建切换框。 I'm trying to do by this code but window is running successfully but dynamically toggle-box is not creating.
我正在尝试通过此代码执行此操作,但 window 运行成功,但未创建动态切换框。 I'm not getting where I'm doing wrong?
我没有得到我做错的地方?
/* This is in the internal procedure of a window(cb.w)*/
Define variable h as handle.
/*Taking toogle-box name as input*/
Input from check.txt.
Import unformatted
Name_checkbox
Input close.
Create toogle-box h
Assign
Row = 2
Column = 1
Label = name_checkbox
Visible = true.
Add FRAME = FRAME {&FRAME-NAME}:HANDLE to the ASSIGN block.将 FRAME = FRAME {&FRAME-NAME}:HANDLE 添加到 ASSIGN 块。
A complete sample that does not contain import noise, compiles (since a toogle-box is not a widget, but that looks like the least of your problems if your example is representative of your actual code) and works:一个不包含导入噪音的完整示例,可以编译(因为工具框不是小部件,但如果您的示例代表您的实际代码,那么这看起来像您的问题最少)并且可以工作:
def var hwwindow as handle.
def var hwframe as handle.
def var hwtoggle as handle.
create window hwwindow assign
width-pixels = 200
height-pixels = 200
status-area = false
message-area = false
.
create frame hwframe assign
parent = hwwindow
height = hwwindow:height
width = hwwindow:width
.
create toggle-box hwtoggle assign
frame = hwframe
row = 1.5
col = 3
label = "dynamic toggle box"
visible = true
sensitive = true
.
apply "entry" to hwtoggle.
wait-for close of hwwindow.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.