开发者

How to attach a list of strings to the main window in ObjC?

I have my main window and I'd like to attach a sheet to it: this sheet would list some strings and the user should choose one of them (double-clicking it, for example). Now: I know how to attach a sheet, so this is not a problem... but I DON'T know how to create such a sh开发者_Python百科eet... In AppleScript is very simple: the command is "choose from list". How can I achieve the same thing in ObjC?

Thanks a lot!


You would usually do this with a custom NSWindowController that loads the sheet window from a nib. The list is typically implemented as an NSTableView. It's a bit too complex of a topic to describe each individual step here. The Table View Programming Guide could help you getting started with the list part.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜