uo_ddlb_status.sru 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. $PBExportHeader$uo_ddlb_status.sru
  2. forward
  3. global type uo_ddlb_status from dropdownlistbox
  4. end type
  5. end forward
  6. global type uo_ddlb_status from dropdownlistbox
  7. integer width = 416
  8. integer height = 808
  9. integer textsize = -9
  10. integer weight = 400
  11. fontcharset fontcharset = gb2312charset!
  12. fontpitch fontpitch = variable!
  13. string facename = "宋体"
  14. long textcolor = 33554432
  15. string text = "[全部]"
  16. boolean sorted = false
  17. boolean vscrollbar = true
  18. string item[] = {"[全部]","待审核[0]","已审核[1]"}
  19. borderstyle borderstyle = stylelowered!
  20. event uof_getvalue ( )
  21. end type
  22. global uo_ddlb_status uo_ddlb_status
  23. type variables
  24. Int uo_status = -1
  25. Int dft_index = -1
  26. end variables
  27. event uof_getvalue();IF This.Text = '[全部]' THEN
  28. uo_status = -1
  29. ELSE
  30. uo_status = Long(Mid ( This.Text,Pos(This.Text,'[') + 1,Len(This.Text) - Pos(This.Text,'[') - 1 ))
  31. END IF
  32. RETURN
  33. end event
  34. on uo_ddlb_status.create
  35. end on
  36. on uo_ddlb_status.destroy
  37. end on
  38. event destructor;long index
  39. index = this.finditem(this.text, 0)
  40. f_SetProfileString(sys_empid, String(parent.ClassName()), "dft_status", string(index))
  41. end event
  42. event constructor;Long Index
  43. IF dft_index < 0 THEN
  44. Index = Long(f_ProfileString(sys_empid, String(Parent.ClassName()), "dft_status",'1'))
  45. ELSE
  46. Index = dft_index
  47. END IF
  48. This.SelectItem(Index)
  49. Event uof_getvalue()
  50. end event
  51. event selectionchanged;Event uof_getvalue()
  52. //IF THIS.Text = '[全部]' THEN
  53. // uo_status = -1
  54. //ELSE
  55. // uo_status = Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  56. //END IF
  57. end event