Hi, sorry for inconvenience, this is my first post and I'm new with Python.
I'm trying to understand how one can get the user-selected text inside a scrolledText entry (tkInter).
I was fancying a button, and when you would click the button the program would get the part of the scrolledText content that is currently selected, if any (this is clearly visible on the screen). I thought there was a getSelectedText method or something like that attached to the entry, or at least that you could easily get the indexes of the beginning and the end of the selected text substring, but I searched the doc in vain.
Thank you for any hint...
OMG, I finally just found it (on stackoverflow.com):
I'm trying to understand how one can get the user-selected text inside a scrolledText entry (tkInter).
I was fancying a button, and when you would click the button the program would get the part of the scrolledText content that is currently selected, if any (this is clearly visible on the screen). I thought there was a getSelectedText method or something like that attached to the entry, or at least that you could easily get the indexes of the beginning and the end of the selected text substring, but I searched the doc in vain.
Thank you for any hint...

from tkinter import scrolledtext # ... self.inp_encours = scrolledtext.ScrolledText(sframe3_1, width=86, height=35, font=("Arial", 10), bg=rdo_color, fg="black", wrap=WORD) # ... retour = self.inp_encours.get(1.0, "end") # that's OK to get the entire content, but now I would like to get just the selected part of it
OMG, I finally just found it (on stackoverflow.com):
myText = self.inp_encours.selection_get()How could I not have found it straight on, I dunno... Sorry...