1

I have an NSButton in the bottom right corner of an NSWindow. The latter is resizeable.

If I try to click my NSButton, the resizing cursor resize shows as long as my cursor is close to the corner. It's a little inconvenient, at this point I'm wondering, is there any way to prioritise the NSButton hover over the resizing?

  • 1
    I would recommend increasing the spacing towards the edge. Everything else is a hack :) – csch Jul 10 '15 at 15:13
  • Yes so far I just tweak the UI a little, hacks would still be welcome though as an icon in the bottom right corner seems most appropriate for what I'm after. – Bruno Vandekerkhove Jul 11 '15 at 15:05
  • 1
    Is the behaviour you're seeing any different to what's happening in Mail.app bottom left corner? It seems to be ok there with the plus icon and window resizing. – csch Jul 12 '15 at 08:35
  • The behaviour is similar in the Mail app, there too I find the resizing cursor slightly obtrusive. Their plus button is further away from the corner than my button is, so it's not as bad. – Bruno Vandekerkhove Jul 12 '15 at 08:44
  • 1
    I think you should be able to set a different cursor for the button using this approach: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CursorMgmt/Tasks/ChangingCursors.html – csch Jul 12 '15 at 09:28
  • That doesn't work, the resizing cursor is still prioritised. Thanks for the idea, though. – Bruno Vandekerkhove Jul 12 '15 at 09:42
  • 1
    Did you try using NSTrackingArea? I'm not sure if it works but you could give it a try. There's a thread with an example here: http://stackoverflow.com/questions/21652158/change-mouse-cursor-over-inactive-nswindow – csch Jul 12 '15 at 09:52
  • `-mouseEntered:` gets called just fine, the cursor does not change as I call `[self.cursor push]` – Bruno Vandekerkhove Jul 12 '15 at 11:36
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/83078/discussion-between-csch-and-bruno). – csch Jul 12 '15 at 18:31

0 Answers0