Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff21-Dec-18 23:14
mveOriginalGriff21-Dec-18 23:14 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_21-Dec-18 23:22
_Q12_21-Dec-18 23:22 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff21-Dec-18 23:23
mveOriginalGriff21-Dec-18 23:23 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_21-Dec-18 23:28
_Q12_21-Dec-18 23:28 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_21-Dec-18 23:28
_Q12_21-Dec-18 23:28 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff21-Dec-18 23:52
mveOriginalGriff21-Dec-18 23:52 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_22-Dec-18 4:37
_Q12_22-Dec-18 4:37 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff22-Dec-18 4:51
mveOriginalGriff22-Dec-18 4:51 
I'd do two things: Add a Paint method to the class which takes a single parameter: the Graphics context from the Containing classes Paint event.
And I'd add a Contains method returning a bool, which again takes a single parameter: a Point which it checks is inside it's "boundaries" (using the Location and Size information it contains). This could change the Name to be drawn, or that could be done externally, it depends what - exactly - you are trying to do, and how it all fits together as a complete system.

The containers MouseMove calls each Human instance's Contains method so they "know" if the mouse in over them or not. (The containers MouseExit event handler can reset them all)
This can call Invalidate to force a redraw as needed.

The Containers Paint event also calls each Human instance's Paint method so it draws itself.

Make sense?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_22-Dec-18 5:43
_Q12_22-Dec-18 5:43 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_22-Dec-18 6:08
_Q12_22-Dec-18 6:08 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_22-Dec-18 6:16
_Q12_22-Dec-18 6:16 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
OriginalGriff22-Dec-18 6:19
mveOriginalGriff22-Dec-18 6:19 
GeneralRe: Properties does not change in custom MouseEnter event incomplete implementation. Pin
_Q12_22-Dec-18 6:41
_Q12_22-Dec-18 6:41 
Questionhow to hide a column in excel through C# Pin
Member 1204584621-Dec-18 0:39
Member 1204584621-Dec-18 0:39 
AnswerRe: how to hide a column in excel through C# Pin
jschell23-Dec-18 7:49
jschell23-Dec-18 7:49 
QuestionENUM value in method Pin
Member 1409081521-Dec-18 0:16
Member 1409081521-Dec-18 0:16 
AnswerRe: ENUM value in method Pin
OriginalGriff21-Dec-18 0:32
mveOriginalGriff21-Dec-18 0:32 
GeneralRe: ENUM value in method Pin
Member 1409081521-Dec-18 0:50
Member 1409081521-Dec-18 0:50 
GeneralRe: ENUM value in method Pin
OriginalGriff21-Dec-18 1:01
mveOriginalGriff21-Dec-18 1:01 
GeneralRe: ENUM value in method Pin
Richard Deeming21-Dec-18 1:13
mveRichard Deeming21-Dec-18 1:13 
QuestionKill execute function Pin
MatrixRatrix20-Dec-18 5:50
MatrixRatrix20-Dec-18 5:50 
AnswerRe: Kill execute function Pin
Richard Deeming20-Dec-18 6:01
mveRichard Deeming20-Dec-18 6:01 
GeneralRe: Kill execute function Pin
MatrixRatrix20-Dec-18 7:09
MatrixRatrix20-Dec-18 7:09 
GeneralRe: Kill execute function Pin
Richard Deeming20-Dec-18 8:09
mveRichard Deeming20-Dec-18 8:09 
GeneralRe: Kill execute function Pin
OriginalGriff20-Dec-18 8:20
mveOriginalGriff20-Dec-18 8:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.