How to get the position of the character of the clicked position in the string in Label?

if the label is loaded with an English article, click label and want the word in the click location to have a background color. So to get the position of the character to be clicked, then match the spaces before and after to get the complete word, and then add a colored background color to the specific position.

Feb.28,2021

getSelection()

you can get the node and location information of the click location

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2cc16-33b29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2cc16-33b29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?