开发者

How do I display a simple text box in objective-c/cocoa?

I would like to display a box containing text to the user while the code continues to run and then close the box at a later time. Something lik开发者_高级运维e NSRunAlertPanel that you could open and then close later.

Pseudo-code:

OpenTextBox *box = OpenTextBox("Please wait.")

various commands

[box close]


I wonder if you're asking the wrong question. If you want to show UI that just says "Please wait", the typical Mac OS X way to do it is with a progress indicator. See "Progress Indicators" and/or the NSProgressIndicator reference -- it can display both the bar that fills with blue and the gear that spins around.

If you think you really do need to show a modal dialog, look at "Sheet Programming Topics".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜