Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a TableLayoutPanel on a form (5 columns / 2 rows) Pictures are presented in row 1 and a description for each picture is presented in row 2. Is there a way to change the color of the text associated with its picture (row 2) when the user moves the mouse over the picture in (row 1) ?

What I have tried:

I have not tried anything yet, I do not know where to begin.
Posted
Updated 12-Mar-18 9:54am

1 solution

Yes of course ...
The first Step is to calculate the Size and the Location of each Sub-Panel of this Control. This Calculation is to be done each time the Size of the Control changes or the ClientSize inside the Control changes.
Now you have to work with the Events of this Control - perhaps MouseMove. This will give you the current location of the Mouse.
At least you only need to check inside which Sub-Panel the Mouse currently is located.

But the best way will be to customize the Control and do all the required Calculation (and Animation) inside it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900