简体   繁体   中英

richtextbox, embedding custom object

I have a customized class which holds every move in chess and I want to write down every move to a richtextbox. So I am going to overload the tostring() of that custom class and use some formatting to add it to the rtf property of richtextbox. I need to find out which object is clicked so that I can set the game board accordingly. I don't know how to detect which object is clicked inside the richtextbox. Probabely I can use LinkClicked event of the richtextbox by introducing every object as a link to richtextbox. Any ideas??

不是您问题的直接答案-但是使用ListBox,ListView或其他列表控件不仅简单得多,而且可以满足您的所有要求,甚至更多(这是它们的目的)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM