-1

I have a program that dynamically draws rectangles and then draws the string (name and description) inside the rectangles. My intended behavior is when a user clicks on any of the rectangle, it should show the typing cursor and allow the text to be edited.

What I have tried so far is create a textbox overlay the rectangle the user clicked on. This seems to work ok but I feel as if this isn't the best way to handle it. Does anyone have an alternate solution/idea?

cfrost
  • 1

1 Answers1

0

its a bit complicated and maybe not worth it but, you can listen to user keyboard and when is clicking the rectangle start inputting the text from keyboard to a label (on top of the rectangle)...

yossef douieb
  • 146
  • 1
  • 2
  • 12