looking for advice with control implementation
looking for advice with control implementation
- Subject: looking for advice with control implementation
- From: eblueBeta <email@hidden>
- Date: Wed, 17 Oct 2001 10:19:40 -0400
hi guys,
I am trying to make two types of controls,
if we think of them as buttons, they look like static text, when clicked
their behavior differs.
the first one turns into a text field filled with the title of the
button when the user changes the text the control changes its value,
sends its action, and then turns back into static text.
the second control when the user clicks and drags on it, changes its
text value, this is a sort of compact version of a slider typically the
value is a number and it goes up when the user pulls the drag to the
right, and down when the user pulls to the left.
my first instinct is to subclass NSButton, then either change the cell
class or put a NSTextfieldConttrol inside the button right after the
mouse click. These approaches sound terribly hairy and in the failed
attempts they prove a great deal more difficult than they sound.
Given the needs of the textFieldButton, how would you guys implement it?
what about the textSlider? (which, although i haven't tried to implement
yet, sounds a bit easier than the textFieldButton)
anyhoo, peace,
ted