开发者

c# windows form - selecting drawn rectangles from picture box

I am drawing rectangles inside a picture box, based on data that is being pulled from database. Everything works correctly, now my question is, is that possible to select created rectangles? I'd like to be able to select the rectangle an开发者_如何学JAVAd change the data in it.

I guess one of the options will be to along with rectangles display the list of them, and select them from there.

If anyone has any experience with this, I would greatly appreciate a tip.

Thank you,

H


You could, instead of adding directly a rectangle to the form picture box, create a custom windows forms control that holds a rectangle, and add it to the form directly, or to some kind of container.

There you can easily handle the click event of your custom control.

Look here for help on how to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜