#NEWLINE# def menuAddLabelRoles( self , includeConceptName = False , menulabel = None ) : #NEWLINE# #INDENT# if self . menu : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( menulabel is None ) : #NEWLINE# #INDENT# menulabel = _ ( 'Label role' ) #NEWLINE# #UNINDENT# rolesMenu = Menu ( self . viewFrame , tearoff = 0 ) #NEWLINE# self . menu . add_cascade ( label = menulabel , menu = rolesMenu , underline = 0 ) #NEWLINE# from arelle.ModelRelationshipSet import labelroles #NEWLINE# for x in labelroles ( x . modelXbrl , includeConceptName ) : #NEWLINE# #INDENT# rolesMenu . add_command ( label = x [ 0 ] [ 1 : ] , underline = 0 , command = ( lambda a = x [ 1 ] : self . setLabelrole ( a ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# self . modelXbrl . info ( 'arelle:internalException' , _ ( 'Exception creating context label roles menu in %(title)s: %(error)s' ) , modelObject = self . modelXbrl . modelDocument , title = self . tabTitle , error = str ( ex ) ) #NEWLINE# self . menu = None