**:
直接上**:
[html]view plain
copy
print?
<?
xmlversion
="1.0"
encoding
="utf-8"
?>
<
xmlns:fx
=""xmlns:s
="library:"
xmlns:mx
="library:"
minwidth
="955"
minheight
="600"
>
<
fx:script
>
import mx.collections.xmllistcollection;
import mx.controls.alert;
[bindable]
[embed(source="images/open.png")]
public var folderopen:class;
[bindable]
[embed(source="images/close.png")]
public var folderclose:class;
[bindable]
[embed(source="images/file.png")]
public var fileinfo:class;
[bindable]
private var company:xml=
;[bindable]
private var companydata:xmllistcollection=new xmllistcollection(company.department);
private function addnode():void
}private function removenode():void
var nodep:xml=node.parent();
var childrenlist:xmllistcollection=new xmllistcollection(xmllist(nodep).children());
var i:number=childrenlist.getitemindex(node);
childrenlist.removeitemat(i);
if(childrenlist.length == 0)
tree1.selecteditem = nodep;
else
}else}/*
* 根據節點名字模糊查詢
*/private function findnode(key:string):void
/** 展開
*/private function expandparents(xmlnode:xml):void
}//展開所有
private function expandall():void
//收起所有
private function closeall():void
]]>
fx:script
>
<
s:layout
>
<
s:horizontallayout
horizontalalign
="center"
verticalalign
="middle"
/>
s:layout
>
<
s:panel
title
="實現新增和刪除節點"
width
="450"
height
="450"
>
<
s:layout
>
<
s:horizontallayout
/>
s:layout
>
<
mx:treeid=
"tree1"
dataprovider=""
labelfield
="@name"
height
="300"
showroot
="false"
width
="260"
defaultleaficon=""
folderopenicon=""
folderclosedicon=""
/>
<
mx:vbox
>
<
s:button
label
="展開所有"
click
="expandall()"
/>
<
s:button
label
="關閉所有"
click
="closeall()"
/>
<
mx:button
label
="刪除節點"
click
="removenode();"
/>
<
mx:hbox
>
<
s:textinputid=
"empname"
width
="60"
click=""
prompt
="新節點名"
/>
<
mx:button
label
="新增節點"
click
="addnode();"
/>
mx:hbox
>
<
mx:hbox
>
<
s:textinputid=
"keyname"
width
="60"
prompt
="關鍵字"
/>
<
mx:button
label
="查詢節點"
click
="findnode(keyname.text)"
/>
mx:hbox
>
mx:vbox
>
s:panel
>
>
裡面有設定展開和關閉和檔案的
陣列的增加 刪除 查詢
陣列的增加 刪除 查詢 試題 設定乙個類,命名為list,類中包含屬性 object element 方法有如下幾個 增加方法add 可以向陣列屬性中依次儲存object,陣列內容存滿時,需實現動態擴容。刪除方法remove 可以根據資料或下標,從陣列屬性中刪除object資料,刪除後,陣列後續元素...
DELPHI 查詢,增加,修改,刪除
unit unit1 inte ce uses windows,messages,sysutils,variants,classes,graphics,controls,forms,dialogs,grids,dbgrids,db,adodb,stdctrls type tform1 class t...
ELK插入,增加,刪除查詢資料
4.1 問題 本案例要求 使用curl命令連線使用es資料庫 使用put方法增加資料 使用post修改資料 使用get查詢資料 使用delete刪除資料 4.2 步驟 實現此案例需要按照如下步驟進行。步驟一 增加資料 root es5 curl x put d created true 步驟二 修改...