开发者

How to make a NSComboBox invisible or transparent

Hello there I am trying to make a NSComboBox transparent but its not working. I am trying it with the following method:

[NSComboBox setTransparent:开发者_开发问答YES];

But it seems that NSComboBox doesn't implement setTransparent neither does NSComboBoxCell nor NSTextField. Looking forward to your suggestions and answers.

Regards Umair


[comboBox setHidden:1];


I'll add in addition to Justin's answer that you should specify why you want to do this. The reasons for your goal can mean the difference between using -setHidden: and, say, setting the control to have no bezel.

Additionally, it's very un-Mac-like to have UI that hides controls. It's almost always the right choice to disable a control if it is unavailable because of some other state. Alternatively, if you're switching subsets of controls based on a choice, consider using an NSTabView without tabs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜