How to create a button dynamically and set action in subclass of NSView?
How to create a button dynamically and set action in subclass of NSView?
- Subject: How to create a button dynamically and set action in subclass of NSView?
- From: "Anish Kumar" <email@hidden>
- Date: 6 Dec 2004 07:07:53 -0000
Hi All,
Sorry for this trivial question, but this is bugging me for sometime now. My application has
annotation feature where users can comment on the image and a icon will be placed at the
location where the user commented so that later when he clciks the icon the original
comment has to be shown to the user.
My problem description in simple terms is: I want to intialize and create a button during
run-time that can be placed over a image.(The location of the button indicates that there is
comment for the image at that location.) The button will be placed over a border-less
window with that window attached as a child-window to the window that display the image.
My question is:-
1. how to intialize and create a button and set action to it during run-time over a child
window.
I am able to intialize and display a icon and capture the mouse-down event, but as
NSImageView doesn't send a action message to a outlet unless the image has changed
(http://lists.apple.com/archives/cocoa-dev/2003/Jun/msg02067.html), I thought of going
for the button instead of the icon.
Thanks in advance,
-Anish
_______________________________________________
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