[Gambas-user] Drag and drop on GTK+2

Bruce Steers bsteers4 at gmail.com
Wed Mar 22 15:31:40 CET 2023


On Wed, 22 Mar 2023 at 14:22, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
> On Wed, 22 Mar 2023 at 14:17, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>>
>>
>> On Sun, 19 Mar 2023 at 19:45, Benoit Minisini <
>> benoit.minisini at gambas-basic.org> wrote:
>>
>>> Le 19/03/2023 à 20:36, Benoit Minisini a écrit :
>>> >
>>> > Mmm... All controls ignore drops by default, except editing controls
>>> > like TextBox and TextArea, both in Qt and GTK+ by the way. And I
>>> ignored
>>> > that fact, hence the incoherent behaviour you noticed.
>>> >
>>> > I will make the Drop property True by default for TextBox and TextArea
>>> > and see if it raises some other problems.
>>> >
>>> > Regards,
>>> >
>>>
>>> Done in last commit. Let's see now what happens, if some things break...
>>>
>>
>> I wouldn't say broken but i am now getting this warning if I have set
>> Drop to False on a TextArea..
>>
>> (_aa:947938): Gtk-WARNING **: 14:10:53.667: Can't set a target list on a
>> widget until you've called gtk_drag_dest_set() to make the widget into a
>> drag destination
>>
>> Only with TextArea , TextBox does not give the warning.
>> Happens if Drop is set to false via code or by the IDE designer.
>>
>
> ps, it is otherwise working as expected , drop is not working if set to
> false.
> pps, I get the warning message when closing the application not when it
> runs or during use. just when exiting.
>


One slight bug..
Setting Drop to true of false in the IDE "DOES" toggle the ability to Drop
on the object but...
if you use the following code...

Print TextBox1.Drop
It prints False regardless of what it is set to until you explicitly set
Drop = True via Code.

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230322/783b087d/attachment.htm>


More information about the User mailing list