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

BB adamnt42 at gmail.com
Thu Oct 12 05:16:56 CEST 2023


The question was "*Why is the TextArea.Drop event not fired*".**


On 12/10/23 1:33 pm, vuott--- via User wrote:
> 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 ]----
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231012/0a53416d/attachment-0001.htm>


More information about the User mailing list