[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:34:57 CEST 2023
Opss... sorry.
TextArea.Drop is not an Event, rather it is a **Property** which must be assigned the boolean value "True" in order for "TextArea" to accept drops.
As you can see in my two codes, I have in fact assigned the Boolean value "True" to the "TextArea1.Drop" Property.
12 ott 2023, 05:18 da adamnt42 at gmail.com:
>
> 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/52e6e44c/attachment.htm>
More information about the User
mailing list