0

Hello! I have a specific idea for the proram, but I don't really understand how to make it. What I need:
Standard Window with Canvas which is divided in a 10x10 boxed field. When you move your mouse over one of these boxes, it must become red (each box is white). When you move your mouse to another box, it becomes red, but the previous becomes white again.

I know how to make Canvas and I can divide it into 10x10 field. But I don't know how to make these boxes change color. It would be great if you could post a code here and I will try to understand it. This task is simple, but somehow I don't quite get it.

3
Contributors
3
Replies
11
Views
4 Years
Discussion Span
Last Post by ddanbe
0

What code are you using?

Off hand I'd say look at the mouse enter event, and the IsMouseOver property.

0

Currently, none. I know about events. The main problem is that I can't understand properly how to differ these boxes on the field and how to manipulate them (recoloring them, at first). I try to understand it theoretically first, so that I will understand the mechanics of the code itself, not just copy it from somewhere.

0

Are you using WPF or WinForm?
You could implement 100 TextBox, Button etc. and implement the MouseHover event.
There is a video lesson somewhere about it I will try to find it for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.