DropText.dfm 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. object FormText: TFormText
  2. Left = 217
  3. Top = 143
  4. BorderIcons = [biSystemMenu]
  5. BorderStyle = bsDialog
  6. Caption = 'Drag '#39'n'#39' Drop Demo - Text'
  7. ClientHeight = 342
  8. ClientWidth = 461
  9. Color = clBtnFace
  10. Font.Charset = DEFAULT_CHARSET
  11. Font.Color = clWindowText
  12. Font.Height = -11
  13. Font.Name = 'Arial'
  14. Font.Style = []
  15. Icon.Data = {
  16. 0000010001001010100000000000280100001600000028000000100000002000
  17. 00000100040000000000C0000000000000000000000000000000000000000000
  18. 0000000080000080000000808000800000008000800080800000C0C0C0008080
  19. 80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
  20. 0000000000000000000000F8000000000000F8F800000800080F0FF0000008FF
  21. FF0FFF08FF0008FFFF0FFFFF0F0008FFFF0FFFF0FF0008FF870FFF078F0008FF
  22. FF0FF0FFFF0008FF870F07888F0008FFFF00FFFFFF0008FF870788FFFF0008FF
  23. FFFFFFFFFF0008FFFFFFFFFFFF0008888888888888800000000000000000FFCF
  24. 0000FD8F0000FC0F000080010000800100008001000080010000800100008001
  25. 0000800100008001000080010000800100008001000080010000FFFF0000}
  26. OldCreateOrder = True
  27. Position = poScreenCenter
  28. OnCreate = FormCreate
  29. OnDestroy = FormDestroy
  30. PixelsPerInch = 96
  31. TextHeight = 14
  32. object Memo1: TMemo
  33. Left = 11
  34. Top = 181
  35. Width = 439
  36. Height = 68
  37. TabStop = False
  38. Alignment = taCenter
  39. Color = clBtnFace
  40. Lines.Strings = (
  41. 'This (bottom) example demonstrates dragging a text SELECTION'
  42. 'to another application that can accept text.'
  43. 'The drag code is almost identical to above but requires the edit' +
  44. ' control'
  45. 'to be hooked to override normal WM_LBUTTONDOWN processing.')
  46. ReadOnly = True
  47. TabOrder = 3
  48. WantReturns = False
  49. end
  50. object ButtonClose: TButton
  51. Left = 11
  52. Top = 286
  53. Width = 439
  54. Height = 30
  55. Cancel = True
  56. Caption = '&Close'
  57. Font.Charset = DEFAULT_CHARSET
  58. Font.Color = clWindowText
  59. Font.Height = -16
  60. Font.Name = 'Arial'
  61. Font.Style = [fsBold]
  62. ParentFont = False
  63. TabOrder = 5
  64. OnClick = ButtonCloseClick
  65. end
  66. object Edit2: TEdit
  67. Left = 11
  68. Top = 256
  69. Width = 439
  70. Height = 22
  71. AutoSelect = False
  72. TabOrder = 4
  73. Text =
  74. 'Select some or all of this text and drag it to another applicati' +
  75. 'on which will accept text.'
  76. OnMouseMove = Edit2MouseMove
  77. end
  78. object StatusBar1: TStatusBar
  79. Left = 0
  80. Top = 323
  81. Width = 461
  82. Height = 19
  83. Panels = <>
  84. SimplePanel = True
  85. SizeGrip = False
  86. end
  87. object Memo2: TMemo
  88. Left = 11
  89. Top = 46
  90. Width = 439
  91. Height = 67
  92. TabStop = False
  93. Alignment = taCenter
  94. Color = clBtnFace
  95. Lines.Strings = (
  96. 'This (top) example demonstrates a very simple drag operation whi' +
  97. 'ch allows '
  98. 'dragging ALL of the edit control text TO and FROM other applicat' +
  99. 'ions which '
  100. 'accept Drag'#39'n'#39'Drop text (eg WordPad). Drag to Desktop to create ' +
  101. 'scrap file.'
  102. 'Implementing this takes only a few lines of code.')
  103. ReadOnly = True
  104. TabOrder = 0
  105. WantReturns = False
  106. end
  107. object Edit1: TEdit
  108. Left = 11
  109. Top = 118
  110. Width = 439
  111. Height = 22
  112. Cursor = crHandPoint
  113. AutoSelect = False
  114. TabOrder = 1
  115. Text =
  116. 'Click on this edit control and drag it to another application wh' +
  117. 'ich will accept text.'
  118. OnMouseDown = Edit1MouseDown
  119. end
  120. object ButtonClipboard: TButton
  121. Left = 11
  122. Top = 145
  123. Width = 439
  124. Height = 24
  125. Caption = 'Click this button to copy the above text to the Clipboard'
  126. TabOrder = 2
  127. OnClick = ButtonClipboardClick
  128. end
  129. object Panel1: TPanel
  130. Left = 10
  131. Top = 8
  132. Width = 440
  133. Height = 30
  134. BevelOuter = bvNone
  135. BorderWidth = 1
  136. BorderStyle = bsSingle
  137. Caption = 'TDropTextSource, TDropTextTarget'
  138. Color = clGray
  139. Font.Charset = DEFAULT_CHARSET
  140. Font.Color = clWhite
  141. Font.Height = -16
  142. Font.Name = 'Arial'
  143. Font.Style = [fsBold]
  144. ParentFont = False
  145. TabOrder = 7
  146. end
  147. object DropSource1: TDropTextSource
  148. DragTypes = [dtCopy]
  149. OnFeedback = DropSourceFeedback
  150. ImageIndex = 0
  151. ShowImage = False
  152. ImageHotSpotX = 16
  153. ImageHotSpotY = 16
  154. AllowAsyncTransfer = False
  155. Left = 16
  156. Top = 51
  157. end
  158. object DropTextTarget1: TDropTextTarget
  159. Dragtypes = [dtCopy, dtLink]
  160. GetDataOnEnter = False
  161. OnDrop = DropTextTarget1Drop
  162. ShowImage = True
  163. Target = Edit1
  164. AllowAsyncTransfer = False
  165. Left = 416
  166. Top = 80
  167. end
  168. object DropTextTarget2: TDropTextTarget
  169. Dragtypes = [dtCopy]
  170. GetDataOnEnter = False
  171. OnDrop = DropTextTarget2Drop
  172. ShowImage = True
  173. Target = Edit2
  174. AllowAsyncTransfer = False
  175. Left = 418
  176. Top = 216
  177. end
  178. object DropDummy1: TDropDummy
  179. Dragtypes = []
  180. GetDataOnEnter = False
  181. ShowImage = True
  182. Target = Owner
  183. AllowAsyncTransfer = False
  184. Left = 416
  185. Top = 48
  186. end
  187. end