[英]Creating a toggle box dynamically on a window
我從文本文件中獲取切換框名稱,然后在 window 上動態創建切換框。 我正在嘗試通過此代碼執行此操作,但 window 運行成功,但未創建動態切換框。 我沒有得到我做錯的地方?
/* 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.
將 FRAME = FRAME {&FRAME-NAME}:HANDLE 添加到 ASSIGN 塊。
一個不包含導入噪音的完整示例,可以編譯(因為工具框不是小部件,但如果您的示例代表您的實際代碼,那么這看起來像您的問題最少)並且可以工作:
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.