re: looking for advice with control implementation
re: looking for advice with control implementation
- Subject: re: looking for advice with control implementation
- From: Enrique Zamudio <email@hidden>
- Date: Wed, 17 Oct 2001 12:24:41 -0500
- Organization: Nasoft
For your compact slider, I think what you have to do is to start an
internal event loop when the user clicks on it. Override -mouseDown: and
start your own event loop (I think there's an example of that on
NSView's, NSControl's or NSResponder's documentation). That one's easy.
For the other one, you might want to try something popup-like. When the
user clicks on your control, you can popup a
borderless/titlebarless/modal window with a textfield on it, so that the
user can type the new title and then close the window and change the
title when the user leaves the field (either by clicking somewhere else
or pressing <ENTER> or <TAB> or something). This is tricky, as you have
to create the window programatically and listen for events so that you
can close the window if the user clicks outside it.
eZL