#NEWLINE# def menuAddNameStyle( self , menulabel = None ) : #NEWLINE# #INDENT# if self . menu : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( menulabel is None ) : #NEWLINE# #INDENT# menulabel = _ ( 'Name Style' ) #NEWLINE# #UNINDENT# nameStyleMenu = Menu ( self . viewFrame , tearoff = 0 ) #NEWLINE# self . menu . add_cascade ( label = menulabel , menu = nameStyleMenu , underline = 0 ) #NEWLINE# from arelle.ModelRelationshipSet import labelroles #NEWLINE# nameStyleMenu . add_command ( label = _ ( 'Prefixed' ) , underline = 0 , command = ( lambda a = True : self . setNamestyle ( a ) ) ) #NEWLINE# nameStyleMenu . add_command ( label = _ ( 'No prefix' ) , underline = 0 , command = ( lambda a = False : self . setNamestyle ( a ) ) ) #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# self . modelXbrl . info ( 'arelle:internalException' , _ ( 'Exception creating context name style menu in %(title)s: %(error)s' ) , modelObject = self . modelXbrl . modelDocument , title = self . tabTitle , error = str ( ex ) ) #NEWLINE# self . menu = None