[Pythonmac-SIG] [PyObjC] setting button name in NSOpenPanel
Steph-info
steph-info at wanadoo.fr
Thu Apr 2 09:52:26 CEST 2009
Hi,
I have the following piece of code :
"""
@objc.IBAction
def chooseRec_(self, sender):
op = NSOpenPanel.openPanel()
op.setTitle_('Choisir un dossier')
op.setCanChooseDirectories_(True)
op.setCanChooseFiles_(False)
op.setResolvesAliases_(True)
op.setAllowsMultipleSelection_(False)
result = op.runModalForDirectory_file_types_(None, None, None)
if result == NSOKButton:
self.pathRec = op.filename()
self.pathField.setStringValue_(self.pathRec)
"""
which open an NSOpenPanel but I can't find how to change the default
"Open" and "Cancel" button's names.
Could anybody post a line of code demonstrating how to achieve this
task ?
Thanks
Cordialement,
Stéphane Serra.
More information about the Pythonmac-SIG
mailing list