w_getname.srw 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. $PBExportHeader$w_getname.srw
  2. forward
  3. global type w_getname from window
  4. end type
  5. type cb_2 from commandbutton within w_getname
  6. end type
  7. type cb_1 from commandbutton within w_getname
  8. end type
  9. type st_1 from statictext within w_getname
  10. end type
  11. type sle_1 from singlelineedit within w_getname
  12. end type
  13. end forward
  14. global type w_getname from window
  15. integer width = 832
  16. integer height = 368
  17. boolean titlebar = true
  18. string title = "Untitled"
  19. boolean controlmenu = true
  20. windowtype windowtype = response!
  21. long backcolor = 67108864
  22. string icon = "AppIcon!"
  23. boolean center = true
  24. cb_2 cb_2
  25. cb_1 cb_1
  26. st_1 st_1
  27. sle_1 sle_1
  28. end type
  29. global w_getname w_getname
  30. type variables
  31. string name=''
  32. end variables
  33. event open;string pasName
  34. pasname=message.stringparm
  35. if pasname<>'' then
  36. sle_1.text=pasname
  37. name=pasname
  38. end if
  39. end event
  40. on w_getname.create
  41. this.cb_2=create cb_2
  42. this.cb_1=create cb_1
  43. this.st_1=create st_1
  44. this.sle_1=create sle_1
  45. this.Control[]={this.cb_2,&
  46. this.cb_1,&
  47. this.st_1,&
  48. this.sle_1}
  49. end on
  50. on w_getname.destroy
  51. destroy(this.cb_2)
  52. destroy(this.cb_1)
  53. destroy(this.st_1)
  54. destroy(this.sle_1)
  55. end on
  56. event close;closewithreturn(this,name)
  57. end event
  58. type cb_2 from commandbutton within w_getname
  59. integer x = 439
  60. integer y = 180
  61. integer width = 274
  62. integer height = 84
  63. integer taborder = 20
  64. integer textsize = -9
  65. integer weight = 400
  66. fontcharset fontcharset = gb2312charset!
  67. fontpitch fontpitch = variable!
  68. string facename = "宋体"
  69. string text = "取消"
  70. end type
  71. event clicked;name=''
  72. close(parent)
  73. end event
  74. type cb_1 from commandbutton within w_getname
  75. integer x = 110
  76. integer y = 180
  77. integer width = 274
  78. integer height = 84
  79. integer taborder = 20
  80. integer textsize = -9
  81. integer weight = 400
  82. fontcharset fontcharset = gb2312charset!
  83. fontpitch fontpitch = variable!
  84. string facename = "宋体"
  85. string text = "确定"
  86. end type
  87. event clicked;if sle_1.text='' then
  88. messagebox('','请输入名称')
  89. return
  90. end if
  91. name=sle_1.text
  92. close(parent)
  93. end event
  94. type st_1 from statictext within w_getname
  95. integer x = 41
  96. integer y = 24
  97. integer width = 178
  98. integer height = 68
  99. integer textsize = -9
  100. integer weight = 400
  101. fontcharset fontcharset = gb2312charset!
  102. fontpitch fontpitch = variable!
  103. string facename = "宋体"
  104. long textcolor = 33554432
  105. long backcolor = 67108864
  106. string text = "名称:"
  107. boolean focusrectangle = false
  108. end type
  109. type sle_1 from singlelineedit within w_getname
  110. integer x = 238
  111. integer y = 8
  112. integer width = 549
  113. integer height = 96
  114. integer taborder = 10
  115. integer textsize = -9
  116. integer weight = 400
  117. fontcharset fontcharset = gb2312charset!
  118. fontpitch fontpitch = variable!
  119. string facename = "宋体"
  120. long textcolor = 33554432
  121. borderstyle borderstyle = stylelowered!
  122. end type