• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving objects with the mouse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving objects with the mouse


  • Subject: Re: Moving objects with the mouse
  • From: Jiri Volejnik <email@hidden>
  • Date: Thu, 23 Sep 2004 10:51:30 +0200

Hi Peter,
what about placing another transparent "glass" view above the view which contains your buttons? This "glass view" could handle mouse events as usually. Moreover, you can draw some hiliting there. When entering repositioning mode, simply create a new glass view, give it the same size and autoresizingMask as your buttons view has, and then put it in the parent view of your buttons view using addSubview. That way, the glass view will be a sibling of the buttons view and will be automatically placed above it. When exiting repositioning mode, just remove the glass view from it's superview and release it.


Jirka

On Sep 23, 2004, at 9:34 AM, Peter Karlsson wrote:

Dear list!
I have a NSView where the user programatically adds objects like buttons, sliders and so on. I have 4 buttons where the user can move the object in any direction, up, down, left and right. This is good for moving the object with precision but it would be much better if the user could move the object with the mouse, and only use the 4 buttons the last bit if needed. Can someone please tell me a simple way to do this?
Best regards Peter

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Moving objects with the mouse (From: "Peter Karlsson" <email@hidden>)

  • Prev by Date: Re: NSTimer questions
  • Next by Date: CFDictionaryCreateMutableCopy crash
  • Previous by thread: Re: Moving objects with the mouse
  • Next by thread: CFDictionaryCreateMutableCopy crash
  • Index(es):
    • Date
    • Thread