FLTK logo

[fltk.general] [FLTK 1.3.5] Making a draggable item

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[FLTK 1.3.5] Making a draggable item Catalin Poida Sep 10, 2020  
 
Hi,
I want to make an item draggable between windows.
What I am trying to make is to be able to click&drag an item from one window/TL_Window to another.

So far, I could only think about creating a window with shape and the image of the item and pass the event to it when the item is clicked.
But still encountered a few problems:
 - using an png image with transparent background, how can apply the shape accordingly?
 - cannot pass correctly the event of PUSH and DRAG. If I scale the  draggable  item to 100x100 it works, but if I scale it to 40x40,  it doesn't work (need an additional click on the draggable item). I am wondering if I did something wrong or I forgot something


Was there an easier solution for creating a draggable item between windows? If not, are there any easy solutions to those problems?

Thank you,
Catatlin

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/7eeff4ed-0c47-4e15-a0b9-10faae7d9e21n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.