如何更新对话框b中的列表
大家好,我在一个对话框窗口中有两个list_框。如何在对话框窗口的同一会话中将项目从第一个列表放到第二个列表。
谢谢 我确信你的lisp文件(或类似文件)中有这个
(start_list "1st_Dia");; your key
(mapcar 'add_list ftl_);; your list
现在,使用DCL文件上的“按钮”功能将大量项目从第一个列表转移到另一个列表
(action_tile .... <your function><the button key)
which includes updating the other list with the same code
(start_list "1st_Dia");; your key
(mapcar 'add_list ftl_);; your updated list
)
坚持我正在寻找一个链接(在这个论坛上),这是一个完美的例子,你需要什么 这个问题已经被问了很多次,所以我想我应该在我的网站上发布一个例子:
http://lee-mac.com/listboxsync.html 嗨,李,
一如既往,你给出了正确的建议!!!
非常感谢。
哎哟
无论如何,以防万一你还不明白。。我调整了你的代码作为参考
(defun c:task ( )
(vl-load-com)
(setq listTaskstd (list "1" "2" "3" "4" "5"))
(setq dcl (load_dialog "diastd.dcl"))
(if not (new_dialog "Tasks" dcl) (exit))
(start_list "listTaskstd")
(mapcar 'add_list listTaskStd)
(end_list)
(action_tile "addTask" "(setq newTask $value) " )
(action_tile "addButton" "
(start_list listTaskstd)
(mapcar 'add_list newTask )
(end_list)
"
)
(start_dialog)
(unload_dialog dcl)
)
// now is dcl code
Tasks : dialog
{
label = "My DCL" ;
: boxed_row
{
: column
{
: list_box
{
key = "listTaskstd" ;
width = 60 ;
height = 15 ;
fixed_width = true ;
fixed_height = true ;
multiple_select = false ;
}
}
} //row
: boxed_row
{
: edit_box
{
key = "addTask" ;
edit_width = 60 ;
}
: button
{
label = "Add" ;
key = "addButton" ;
is_default = true ;
alignment = left ;
fixed_width = true;
mnemonic = "Ä";
}
} // row add task
: button
{
label = "OK";
key = "accept";
is_default = true;
fixed_width = true;
alignment = centered;
}
} // task
在未来。避免使用与键相同的变量名 感谢pBe的关注!
以后我会接受你的建议!
如果我能帮你想一想,请发个短信。 Thank pBe for your concern !
I will take your advice in future!
If I can help to you with some think, please send an message.
页:
[1]