peng3d/gui/menus.py
def add_btn_cancel(self,label_cancel):
        """
        Adds a cancel button to let the user cancel whatever choice they were given.
        
        This widget can be triggered by setting the label ``label_cancel`` to a string.
        
        This widget will be positioned slightly below the main label and to the right
        of the confirm button.
        """
        # Cancel Button
        self.wbtn_cancel = button.Button("btn_cancel",self,self.window,self.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2+4,sh/2-bh/2-bh*2),
                        size=[0,0],
                        label=label_cancel,
                        borderstyle=self.borderstyle
                        )
        self.wbtn_cancel.size = lambda sw,sh: (self.wbtn_cancel._label.font_size*8,self.wbtn_cancel._label.font_size*2)
        self.addWidget(self.wbtn_cancel)
        
        def f():
            self.doAction("cancel")
            self.exitDialog()
        self.wbtn_cancel.addAction("click",f)
def add_btn_cancel(self,label_cancel):
        # Cancel Button
        self.wbtn_cancel = button.Button("btn_cancel",self,self.window,self.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2+4,sh/2-bh/2-bh*2),
                        size=[0,0],
                        label=label_cancel,
                        borderstyle=self.borderstyle
                        )
        self.wbtn_cancel.size = lambda sw,sh: (self.wbtn_cancel._label.font_size*8,self.wbtn_cancel._label.font_size*2)
        self.addWidget(self.wbtn_cancel)
        
        def f():
            self.doAction("cancel")
            self.exitDialog()
        self.wbtn_cancel.addAction("click",f)
def add_btn_cancel ( self , label_cancel ) : # Cancel Button self . wbtn_cancel = button . Button ( "btn_cancel" , self , self . window , self . peng , pos = lambda sw , sh , bw , bh : ( sw / 2 + 4 , sh / 2 - bh / 2 - bh * 2 ) , size = [ 0 , 0 ] , label = label_cancel , borderstyle = self . borderstyle ) self . wbtn_cancel . size = lambda sw , sh : ( self . wbtn_cancel . _label . font_size * 8 , self . wbtn_cancel . _label . font_size * 2 ) self . addWidget ( self . wbtn_cancel ) def f ( ) : self . doAction ( "cancel" ) self . exitDialog ( ) self . wbtn_cancel . addAction ( "click" , f )
Adds a cancel button to let the user cancel whatever choice they were given.
        
        This widget can be triggered by setting the label ``label_cancel`` to a string.
        
        This widget will be positioned slightly below the main label and to the right
        of the confirm button.
Adds a cancel button to let the user cancel whatever choice they were given . This widget can be triggered by setting the label label_cancel to a string . This widget will be positioned slightly below the main label and to the right of the confirm button .