Includes | | | | |
//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,true,)
}
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 fashion) {
case pCount==0 : fashion=false
return Control(LISTBOX,, $100+if(fashion,2,),,,,,hwnd,,)
}
lb.getcs(long h){
case getcount(h)<1 : return
long cs=getcursel(h)
case cs<0 : return
return getstring$(h,cs)
}
lb.getpos(long h){
case getcount(h)<1 : return 0
long cs=getcursel(h)
case 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
if hold==true {
string cs=lb.getcs(h)
ti=sendmessage(h,LB_GETTOPINDEX,,)
}
sendmessage(h,wm_setredraw,,)
sendmessage(h,$0184,,)//clear
movelisttohandle(h)
if hold==true {
lb.selectstring(h,cs)
sendmessage (h,LB_SETTOPINDEX,ti,)
} elseif hold==false {
sendmessage (h,LB_SETCURSEL,,)
sendmessage (h,LB_SETTOPINDEX,ti,)
}
sendmessage(h,wm_setredraw,true,)
}
lb.sortinternallist{
long h=lb.create(true)//create sorted list
movelisttohandle(h)
clearlist
movehandletolist(h)
destroywindow(h)
}
lb.removeSelBar(long hLB){
long c=getCurSel(hLB)
case c<0 : return false
string s=getString$(hLB,c)
deleteString(hLB,c)
insertString(hLB,c,s)
return true
}
The Include use I into most Make in them I with ListBoxen zutun have - what not means, that someone other with your get by can or should. take off do I these here only of my Vollständigkeit halber. |
| | | | |
|
AnswerThemeninformationenthis Topic has 1 subscriber: |
|