Recent

Author Topic: More drag/drop pecularties..  (Read 1151 times)

Birger52

  • Full Member
  • ***
  • Posts: 204
Re: More drag/drop pecularties..
« Reply #15 on: May 28, 2020, 06:43:19 pm »
Changed files - if anybody is intersted.

Small changes in TableContainer - improved start of dragging, and removed coloring when dragging out of control.
PlayContainer mouse- and drag-operations changed from "bubbeling" to EventHandling.

(No changes to files and string func packages)
« Last Edit: May 29, 2020, 04:41:49 pm by Birger52 »
Lazarus 2.0.10 FPC 3.2.0
Win7 64bit
Playing and learning - strictly for my own pleasure.

Birger52

  • Full Member
  • ***
  • Posts: 204
Re: More drag/drop pecularties..
« Reply #16 on: May 29, 2020, 01:39:32 am »
Not sure why, but only one of the attached files was uploaded...
Lazarus 2.0.10 FPC 3.2.0
Win7 64bit
Playing and learning - strictly for my own pleasure.

Birger52

  • Full Member
  • ***
  • Posts: 204
Re: More drag/drop pecularties..
« Reply #17 on: May 29, 2020, 04:41:27 pm »
Figured "all the  leaks" out.
They all comes from TList.
I always thought Items were freed, when the list was freed.
But they're not - making sure they are, makes my test-project not creating leaks.

Thx.
Lazarus 2.0.10 FPC 3.2.0
Win7 64bit
Playing and learning - strictly for my own pleasure.

Birger52

  • Full Member
  • ***
  • Posts: 204
Re: More drag/drop pecularties..
« Reply #18 on: May 29, 2020, 09:33:56 pm »
Well...
No matter what I do, it seems the TPanel derived "list container" of mine, do not want to be be dragged - or the Default DragManager do not want to drag my panel. Everything else, but not the one that needs to be dragged.

Either way - I kept my controls functionality, but drag another control - and it works just fine.
So now, when creating my panel, it also creates an invisible TLabel for dragging.
Makes code for accepting drop and dropping a little ... peculiar.
But it overcomes the stubbornness and/or shortcomings of the drag manager.

I would still like an answer to the question, why the DragManager does not want to drag (one of) my Control(s).
What terminates a dragging operaions, besides cancelling and dropping?
Lazarus 2.0.10 FPC 3.2.0
Win7 64bit
Playing and learning - strictly for my own pleasure.

Birger52

  • Full Member
  • ***
  • Posts: 204
Re: More drag/drop pecularties..
« Reply #19 on: May 30, 2020, 03:06:32 pm »
Well - silly me.
No need to create a label to drag - the one that is already there (FHeadLabel) can be used just fine - just needs to be published.
Added an event to make it easier to reset main programs drag variables.
Final (for now) files - with everything working as expected and planned.
Lazarus 2.0.10 FPC 3.2.0
Win7 64bit
Playing and learning - strictly for my own pleasure.

 

TinyPortal © 2005-2018