Re: Text: immutable strings
Cam Farnell <[email protected]> Fri, 26 Oct 2018 12:38:43 -0300
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Hi Vasilis, I've done this successfully. Bind an event handler to the KeyPress event of the text. Check the tags and if they are inside immutable text and the key is something that would change the text the return 'break' which will stop the processing of the key. Cheers Cam Farnell On 2018-10-26 12:12 p.m., Vasilis Vlachoudis wrote: > Hi all, > > I have a Text() widget and I want to display some values tab formatted. > The values should be prefixed with a text-label which is immutable by the user > something like > > label: value label: value > > the user should be able to edit the values but not the labels. > I know that I can insert the label as a window create_window(Label()) > but for very big files it becomes extremely slow > > If I tag the labels, can I forbid the Text widget to disallow the text editing > over this specific tag? > > Thanks in advance > Vasilis > _______________________________________________ > Tkinter-discuss mailing list > [email protected] > https://mail.python.org/mailman/listinfo/tkinter-discuss >