[Gambas-user] Filling a text area with a Text file using drag and drop...

vuott at tutanota.com vuott at tutanota.com
Thu Oct 12 05:03:25 CEST 2023


Maybe...

...by using "TextArea" and "FileChooser":

Public Sub Form_Open()

  With TextArea1
    .Drop = True
    .Wrap = True
  End With
 
End

Public Sub TextArea1_Drop()

  TextArea1.Text = File.Load(FileChooser1.SelectedPath)

End

==========================

...now draging from an Folder:

Public Sub Form_Open()

  With TextArea1
    .Drop = True
    .Wrap = True
  End With

End

Public Sub TextArea1_Drop()
 
  Dim filepath As String
 
  filepath = Drag.Paste("text/uri-list")[0]

  TextArea1.Text = File.Load(Trim(filepath))

End

======================





12 ott 2023, 01:19 da sbungay at smartsonsite.com:

> If a text file is dragged from a file manager to a text area, the drop event of the text area is not raised. Why is that and can it be changed?
> -- 
> Stephen A. Bungay
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231012/fe23a646/attachment.htm>


More information about the User mailing list