TalkingCode
TalkingCode

Reputation: 13557

Cocoa : How to make a control invisible?

In my application I have some controls like NSButton and NSTextfield I want to turn invisible. I know I can do it n the Interface Builder but I need to do it in the code.

I still haven't found the right message I need to send to the controls.

Upvotes: 2

Views: 1485

Answers (2)

Rick Schlueter
Rick Schlueter

Reputation: 141

Actually, this will also disable the control. If you want the control to still work, such as for an NSButton, [button setTransparent:YES] is the one to use.

Upvotes: 1

hbw
hbw

Reputation: 15750

[myView setHidden:YES];

Upvotes: 14

Related Questions