(self, row, col, text=None)
return
When the user single/double clicks on a text/number cell, bring up entry window
When the user single/double clicks on a text/number cell, bring up entry window
When the user single / double clicks on a text / number cell bring up entry window
def drawCellEntry(self, row, col, text=None):
        """When the user single/double clicks on a text/number cell, bring up entry window"""

        if self.read_only == True:
            return
        #absrow = self.get_AbsoluteRow(row)
        h=self.rowheight
        model=self.getModel()
        cellvalue = self.model.getCellRecord(row, col)
        if Formula.isFormula(cellvalue):
            return
        else:
            text = self.model.getValueAt(row, col)
        x1,y1,x2,y2 = self.getCellCoords(row,col)
        w=x2-x1
        #Draw an entry window
        txtvar = StringVar()
        txtvar.set(text)
        def callback(e):
            value = txtvar.get()
            if value == '=':
                #do a dialog that gets the formula into a text area
                #then they can click on the cells they want
                #when done the user presses ok and its entered into the cell
                self.cellentry.destroy()
                #its all done here..
                self.formula_Dialog(row, col)
                return

            coltype = self.model.getColumnType(col)
            if coltype == 'number':
                sta = self.checkDataEntry(e)
                if sta == 1:
                    model.setValueAt(value,row,col)
            elif coltype == 'text':
                model.setValueAt(value,row,col)

            color = self.model.getColorAt(row,col,'fg')
            self.drawText(row, col, value, color, align=self.align)
            if e.keysym=='Return':
                self.delete('entry')
                #self.drawRect(row, col)
                #self.gotonextCell(e)
            return

        self.cellentry=Entry(self.parentframe,width=20,
                        textvariable=txtvar,
                        #bg=self.entrybackgr,
                        #relief=FLAT,
                        takefocus=1,
                        font=self.thefont)
        self.cellentry.icursor(END)
        self.cellentry.bind('<Return>', callback)
        self.cellentry.bind('<KeyRelease>', callback)
        self.cellentry.focus_set()
        self.entrywin=self.create_window(x1+self.inset,y1+self.inset,
                                width=w-self.inset*2,height=h-self.inset*2,
                                window=self.cellentry,anchor='nw',
                                tag='entry')

        return
def drawCellEntry ( self , row , col , text = None ) : if self . read_only == True : return #absrow = self.get_AbsoluteRow(row) h = self . rowheight model = self . getModel ( ) cellvalue = self . model . getCellRecord ( row , col ) if Formula . isFormula ( cellvalue ) : return else : text = self . model . getValueAt ( row , col ) x1 , y1 , x2 , y2 = self . getCellCoords ( row , col ) w = x2 - x1 #Draw an entry window txtvar = StringVar ( ) txtvar . set ( text ) def callback ( e ) : value = txtvar . get ( ) if value == '=' : #do a dialog that gets the formula into a text area #then they can click on the cells they want #when done the user presses ok and its entered into the cell self . cellentry . destroy ( ) #its all done here.. self . formula_Dialog ( row , col ) return coltype = self . model . getColumnType ( col ) if coltype == 'number' : sta = self . checkDataEntry ( e ) if sta == 1 : model . setValueAt ( value , row , col ) elif coltype == 'text' : model . setValueAt ( value , row , col ) color = self . model . getColorAt ( row , col , 'fg' ) self . drawText ( row , col , value , color , align = self . align ) if e . keysym == 'Return' : self . delete ( 'entry' ) #self.drawRect(row, col) #self.gotonextCell(e) return self . cellentry = Entry ( self . parentframe , width = 20 , textvariable = txtvar , #bg=self.entrybackgr, #relief=FLAT, takefocus = 1 , font = self . thefont ) self . cellentry . icursor ( END ) self . cellentry . bind ( '<Return>' , callback ) self . cellentry . bind ( '<KeyRelease>' , callback ) self . cellentry . focus_set ( ) self . entrywin = self . create_window ( x1 + self . inset , y1 + self . inset , width = w - self . inset * 2 , height = h - self . inset * 2 , window = self . cellentry , anchor = 'nw' , tag = 'entry' ) return