Re: NSTextField manipulation -- editing, greying out etc.
Re: NSTextField manipulation -- editing, greying out etc.
- Subject: Re: NSTextField manipulation -- editing, greying out etc.
- From: Ben Dougall <email@hidden>
- Date: Mon, 20 Jun 2005 22:10:07 +0100
On Saturday, June 18, 2005, at 11:58 pm, Ben Dougall wrote:
when i press enter -fix is called but the effect is the text does go
grey but it remains highlighted (but now in a grey selection colour).
also the text field keeps the blue focus ring. then if i click on the
text field again -edit isn't even called this time, so the mouseDown
method isn't being called anymore for some reason.
so how can i deselect the text and get rid of the focus ring, in -fix?
and why isn't mouseDown being called anymore after the first time?
the solution to this is:
- (void)fix
{
[[self window] endEditingFor: nil];
[self setTextColor:[NSColor colorWithCalibratedRed:0.5 green:0.5
blue:0.5 alpha:1.0]];
[self setSelectable:NO];
}
_______________________________________________
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