• Tablelist dragsource

    From Martyn Smith@21:1/5 to All on Tue Jun 20 05:40:54 2023
    I have added a dragsource to my tablelist (6.16 and 6.21) to be able to drag the selection elsewhere in my application.
    But now I can no longer drag out a selection of multiple rows.
    The documentation says that setting dragsource to true should reset the selection on mouse up (DRAG SOURCE SUPPORT FOR GLOBAL DRAG & DROP)
    The following code shows the problem
    tablelist::tablelist .t -width 40 -stretch all -columns {0 Name left 0 Description left} -selectmode extended -customdragsource true -activestyle none
    pack .t -fill both -expand y
    .t insert end [list Part1 "This is part 1"]
    .t insert end [list Part2 "This is part 2"]
    .t insert end [list Part3 "This is part 3"]
    .t insert end [list Part4 "This is part 4"]
    Any mouse press (left) just moves the selection.
    Is there a missing option ?
    Martyn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Tue Jun 20 19:09:54 2023
    Am 20.06.23 um 14:40 schrieb Martyn Smith:
    I have added a dragsource to my tablelist (6.16 and 6.21) to be able to drag the selection elsewhere in my application.
    But now I can no longer drag out a selection of multiple rows.
    The documentation says that setting dragsource to true should reset the selection on mouse up (DRAG SOURCE SUPPORT FOR GLOBAL DRAG & DROP)
    The following code shows the problem
    tablelist::tablelist .t -width 40 -stretch all -columns {0 Name left 0 Description left} -selectmode extended -customdragsource true -activestyle none
    pack .t -fill both -expand y
    .t insert end [list Part1 "This is part 1"]
    .t insert end [list Part2 "This is part 2"]
    .t insert end [list Part3 "This is part 3"]
    .t insert end [list Part4 "This is part 4"]
    Any mouse press (left) just moves the selection.
    Is there a missing option ?
    Martyn

    This is the expected and documented behavior, similar to what you can
    see, e.g, in a file manager. To extend the selection, you will have to
    press Shift or Control before clicking.

    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martyn Smith@21:1/5 to All on Wed Jun 21 05:18:53 2023
    Le mardi 20 juin 2023 à 19:09:59 UTC+2, nemethi a écrit :
    Am 20.06.23 um 14:40 schrieb Martyn Smith:
    I have added a dragsource to my tablelist (6.16 and 6.21) to be able to drag the selection elsewhere in my application.
    But now I can no longer drag out a selection of multiple rows.
    The documentation says that setting dragsource to true should reset the selection on mouse up (DRAG SOURCE SUPPORT FOR GLOBAL DRAG & DROP)
    The following code shows the problem
    tablelist::tablelist .t -width 40 -stretch all -columns {0 Name left 0 Description left} -selectmode extended -customdragsource true -activestyle none
    pack .t -fill both -expand y
    .t insert end [list Part1 "This is part 1"]
    .t insert end [list Part2 "This is part 2"]
    .t insert end [list Part3 "This is part 3"]
    .t insert end [list Part4 "This is part 4"]
    Any mouse press (left) just moves the selection.
    Is there a missing option ?
    Martyn
    This is the expected and documented behavior, similar to what you can
    see, e.g, in a file manager. To extend the selection, you will have to
    press Shift or Control before clicking.

    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba....@t-online.de
    OK, I reread (again) the section and understand better . I was mixing in with the drag select in explorer which superposes a drag rectangle over the entries.
    Thanks for the quick reply

    Martyn

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)