uo_ddlb_scid_notall.sru 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. $PBExportHeader$uo_ddlb_scid_notall.sru
  2. forward
  3. global type uo_ddlb_scid_notall from dropdownlistbox
  4. end type
  5. end forward
  6. global type uo_ddlb_scid_notall from dropdownlistbox
  7. integer width = 247
  8. integer height = 228
  9. integer taborder = 10
  10. integer textsize = -9
  11. integer weight = 400
  12. fontcharset fontcharset = gb2312charset!
  13. fontpitch fontpitch = variable!
  14. string facename = "宋体"
  15. long textcolor = 33554432
  16. boolean sorted = false
  17. boolean vscrollbar = true
  18. borderstyle borderstyle = stylelowered!
  19. end type
  20. global uo_ddlb_scid_notall uo_ddlb_scid_notall
  21. type variables
  22. long uo_scid
  23. end variables
  24. event constructor;Long ls_scid
  25. Long cnt,cnt_user
  26. String ls_scname
  27. long ll_i
  28. string ls_space
  29. int li_spacenum
  30. for ll_i =1 to upperbound(sys_user_scid)
  31. ls_scid = sys_user_scid[ll_i]
  32. SELECT scname
  33. INTO :ls_scname
  34. FROM u_scdef
  35. Where scid = :ls_scid;
  36. if sqlca.sqlcode <> 0 or isnull(ls_scname) then ls_scname = ''
  37. li_spacenum = 50 - len(trim(ls_scname)) - 2 - len(string(ls_scid))
  38. ls_space = fill(' ',li_spacenum)
  39. THIS.AddItem (ls_scname+ls_space+'['+String(ls_scid)+']')
  40. next
  41. THIS.uo_scid = ls_scid
  42. THIS.Text = ls_scname+ls_space+'['+String(ls_scid)+']'
  43. end event
  44. event selectionchanged;uo_scid = Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  45. end event
  46. on uo_ddlb_scid_notall.create
  47. end on
  48. on uo_ddlb_scid_notall.destroy
  49. end on