Пример #1
0
    def _draw(self, canvas, options):
        x, y = self.anchor

        frm = tkFrame(canvas.master)

        self.set_size(self.initial_font_size / canvas.trans.x_scale, False)

        self.widget = tkText(frm,
                             bg=self.fill,
                             bd=self.outline_width,
                             relief=self.relief,
                             width=self.line_length,
                             cursor=self.cursor,
                             exportselection=0,
                             fg=self.font_colour,
                             wrap=tkWORD,
                             font=(self.font, self.font_size, self.font_style),
                             height=self.number_of_lines,
                             insertbackground=self.font_colour)
        self.widget.pack()
        self.set_text(self.text)

        x, y = canvas.to_screen(x, y)

        return canvas.create_window(x, y, window=frm)
Пример #2
0
 def __init__(self, master):
     self.text = tkText(master=master)
     self._bell = False
Пример #3
0
 def __init__(self, master):
     self.text = tkText(master=master)
     self._bell = False