|
发表于 2013-4-28 15:49:13
|
显示全部楼层
lzj_ykds 发表于 2013-4-28 15:00
有没有同时选择多个文件的控件
写一个就行了,HTMLayout自己设计控件非常方便
- import win.ui;
- /*DSG{{*/
- var winform = ..win.form( bottom=399;right=599;text="HTMLayout - 选择多个文件" )
- winform.add( )
- /*}}*/
- import web.layout;
- wbLayout = web.layout(winform)
- wbLayout.html = /**
- <body>
- <div .files filter="HTML files|*.htm;*.html|Text files|*.txt|All files|*.*||" > 选择文件...
- <button #files>...</button>
- </div>
- </body>
- **/
- wbLayout.css = /**
- .files {
- width:200px;
- padding:2px 2px 2px 7px;
- font:system;
- background:url(theme:edit-normal) expand;
- }
- .files button{
- margin-left:100%%;
-
- }
- **/
- import fsys.dlg;
- wbLayout.onButtonClick = {
- files = function (ltTarget,ltEle,reason,behaviorParams) {
- import fsys.dlg;
- var files = fsys.dlg.openEx( ltEle.queryParent(".files").filter,"请选择文件");
-
- if( files ){
- ltEle.queryParent(".files").insertAdjacentHTML("afterEnd",string.join(files,"<br />") )
- }
- }
- }
-
- winform.show();
- win.loopMessage()
-
复制代码 |
|