w_v2_testwin.srw 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. $PBExportHeader$w_v2_testwin.srw
  2. forward
  3. global type w_v2_testwin from w_publ_base
  4. end type
  5. type cb_1 from commandbutton within w_v2_testwin
  6. end type
  7. type dw_1 from datawindow within w_v2_testwin
  8. end type
  9. end forward
  10. global type w_v2_testwin from w_publ_base
  11. integer width = 4283
  12. integer height = 2556
  13. boolean maxbox = true
  14. boolean resizable = true
  15. windowtype windowtype = main!
  16. cb_1 cb_1
  17. dw_1 dw_1
  18. end type
  19. global w_v2_testwin w_v2_testwin
  20. on w_v2_testwin.create
  21. int iCurrent
  22. call super::create
  23. this.cb_1=create cb_1
  24. this.dw_1=create dw_1
  25. iCurrent=UpperBound(this.Control)
  26. this.Control[iCurrent+1]=this.cb_1
  27. this.Control[iCurrent+2]=this.dw_1
  28. end on
  29. on w_v2_testwin.destroy
  30. call super::destroy
  31. destroy(this.cb_1)
  32. destroy(this.dw_1)
  33. end on
  34. event open;call super::open;runtimeLog = true
  35. end event
  36. type cb_func from w_publ_base`cb_func within w_v2_testwin
  37. end type
  38. type cb_exit from w_publ_base`cb_exit within w_v2_testwin
  39. end type
  40. type cb_1 from commandbutton within w_v2_testwin
  41. integer x = 1504
  42. integer y = 1808
  43. integer width = 457
  44. integer height = 128
  45. integer taborder = 50
  46. boolean bringtotop = true
  47. integer textsize = -12
  48. integer weight = 400
  49. fontcharset fontcharset = ansi!
  50. fontpitch fontpitch = variable!
  51. fontfamily fontfamily = swiss!
  52. string facename = "Arial"
  53. string text = "none"
  54. end type
  55. event clicked;s_v2_dw_parms ls_parms
  56. ls_parms.arg_dw = dw_1
  57. ls_parms.arg_colname = 'strcol'
  58. ls_parms.arg_row = dw_1.getrow()
  59. openwithparm(w_v2_dw_filter_rsp, ls_parms)
  60. end event
  61. type dw_1 from datawindow within w_v2_testwin
  62. integer x = 215
  63. integer y = 228
  64. integer width = 2080
  65. integer height = 1112
  66. integer taborder = 20
  67. string title = "none"
  68. string dataobject = "dw_v2_testwin"
  69. boolean livescroll = true
  70. borderstyle borderstyle = stylelowered!
  71. end type
  72. event rowfocuschanged;This.SelectRow(0, False)
  73. IF This.GetRow() > 0 THEN
  74. This.SelectRow(This.GetRow(), True)
  75. END IF
  76. end event
  77. event rbuttondown;string ls_dwoname, ls_dwotype
  78. ls_dwoname = trim(lower(dwo.name))
  79. ls_dwotype = trim(lower(dwo.type))
  80. s_v2_dw_parms s_parms
  81. s_parms.arg_colname = ''
  82. if row > 0 AND (ls_dwotype = 'column' OR ls_dwotype = 'compute') then
  83. s_parms.arg_dw = this
  84. s_parms.arg_colname = ls_dwoname
  85. s_parms.arg_row = row
  86. elseif right(ls_dwoname,2) = '_t' then
  87. ls_dwoname = left(ls_dwoname, len(ls_dwoname) - 2)
  88. ls_dwotype = trim(lower(this.Describe(ls_dwoname+".type")))
  89. if ls_dwotype = 'column' OR ls_dwotype = 'compute' then
  90. s_parms.arg_dw = this
  91. s_parms.arg_colname = ls_dwoname
  92. s_parms.arg_row = 0
  93. end if
  94. end if
  95. if s_parms.arg_colname = '' then
  96. this.SetFilter('')
  97. this.Filter()
  98. else
  99. openwithparm(w_v2_dw_filter_rsp, s_parms)
  100. end if
  101. end event