| |
|
|
|
//Version:0.0.1
lb.swapentries(long lb,e1,e2){
sendmessage(lb,wm_setredraw,,)
insertstring(lb,0,)
insertstring(lb,-1,)
e1+
e2+
string e1s=getstring$(lb,e1)
string e2s=getstring$(lb,e2)
deletestring(lb,e1)
insertstring(lb,e1,e2s)
deletestring(lb,e2)
insertstring(lb,e2,e1s)
deletestring(lb,0)
deletestring(lb,getcount(lb)-1)
sendmessage(lb,wm_setredraw,vrai,)
}
lb.moveupentry(long lb,e){lb.swapentries(lb,e,e-1)}
lb.movedownentry(long lb,e){lb.swapentries(lb,e,e+1)}
lb.create(bool mode) {
cas pCount==0 : mode=faux
return Contrôle(LISTBOX,, $100+si(mode,2,),,,,,hwnd,,)
}
lb.getcs(long h){
cas getcount(h)<1 : return
long cs=getcursel(h)
cas cs<0 : return
return getstring$(h,cs)
}
lb.getpos(long h){
cas getcount(h)<1 : return 0
long cs=getcursel(h)
cas cs<0 : return 0
return cs
}
lb.setpos(long h,p){sendmessage (h,LB_SETCURSEL,p,)}
lb.gettopindex(long h){return sendmessage(h,LB_GETTOPINDEX,,)}
lb.selectstring(long h,string s){;selectstring(h,-1,s)}
lb.settopindex(long h,p){sendmessage (h,LB_SETTOPINDEX,p,)}
lb.movelisttolist(long h,hold){
long ti
si hold==vrai {
string cs=lb.getcs(h)
ti=sendmessage(h,LB_GETTOPINDEX,,)
}
sendmessage(h,wm_setredraw,,)
sendmessage(h,$0184,,)//clear
movelisttohandle(h)
si hold==vrai {
lb.selectstring(h,cs)
sendmessage (h,LB_SETTOPINDEX,ti,)
} elseif hold==faux {
sendmessage (h,LB_SETCURSEL,,)
sendmessage (h,LB_SETTOPINDEX,ti,)
}
sendmessage(h,wm_setredraw,vrai,)
}
lb.sortinternallist{
long h=lb.create(vrai)//create sorted list
movelisttohandle(h)
clearlist
movehandletolist(h)
destroywindow(h)
}
lb.removeSelBar(long hLB){
long c=getCurSel(hLB)
cas c<0 : return faux
string s=getString$(hLB,c)
deleteString(hLB,c)
insertString(hLB,c,s)
return vrai
}
qui Include nutze je dans den meisten Fällen dans denen je avec ListBoxen zutun habe - quoi pas bedeutet, dass quelqu'un d'autre avec son klarkommen peux ou bien soll. enlever tue je cet ici seulement meiner Vollständigkeit halber. |
|
|
| |
|
|