[fxruby-users] FXGLObject canDrag
bjorn.bergqvist at gmail.com
Mon Feb 20 15:50:05 EST 2006
It did help. Thank you!
On 2/20/06, Lyle Johnson <lyle at knology.net> wrote:
> On Feb 20, 2006, at 1:57 AM, Björn Bergqvist wrote:
> > I've noticed that when I have a FXGLObject in a GLViewer it's possible
> > to drag it (the FXGLObject). How do I prevent the FXGLObject from
> > being draggable?
> You need to override the object's canDrag() method, and have it return
> false. If you want all objects of that class to be undraggable, you'd
> want to subclass, e.g.
> class Cone < Fox::FXGLCone
> def canDrag
> or if it's just one particular object that you don't want to be
> cone = FXGLCone.new(...)
> def cone.canDrag; false; end
> Hope this helps,
More information about the fxruby-users