// we need to return used in order to display the window above the current // otherwise it will display it under return 1; }
if (startDragging_) { // now pass the the handle and declare that it is not our business anymore startDragging_ = false; DraggableItem::instance()->handle(event); return 0; }
return Fl_Box::handle(event); }
'''''''''''''''''''''
On Thursday, September 10, 2020 at 12:35:39 PM UTC+3 Catalin Poida wrote:
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?
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.