Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一个功能来删除 StyledTextCtrl 中的选择(不选择任何内容)
txt.SetSelection(-1,-1) #Seems to select everything txt.SetSelection(-1,0) # This will select the first letter
有谁知道如何做到这一点?我似乎无法在 API 中找到它
尝试这个:
txt.SetSelection(0, 0)