开发者

How we set or get focus to any control - and leave the focus in Cocoa

开发者 https://www.devze.com 2022-12-14 21:40 出处:网络
How we set 开发者_Go百科or get focus on any control in cocoa. like setfirstresponder We have 2 control A and B, A is firstresponder

How we set 开发者_Go百科or get focus on any control in cocoa. like setfirstresponder

We have 2 control A and B, A is firstresponder After action I want to set focus ob B control

and also how we get focus on a particular control and how we notify that leave focus..... I need it in validation .... I want to force user to fill a textfield and then go to next field..something like this

Thanks Deepika


You should use NSWindow’s makeFirstResponder: to change the current first responder. See the NSResponder class reference for details on this.


For validation, the -becomeFirstResponder and -resignFirstResponder methods can be overridden.

More details in the documentation

0

精彩评论

暂无评论...
验证码 换一张
取 消