L
Lance
I've noticed that calling the Refresh method of a
PropertyGrid causes a MouseMove event to occur for the
control that owns the mouse. For example, if the mouse is
over PictureBox1 when PropertyGrid1.Refresh is called,
then PictureBox1.OnMouseMove will be invoked.
This behavior is causing major problems for me because I
am tring to update a PropertyGrid whenever the user
manipulates objects that are contained within a PictureBox
so that the PropertyGrid always reflects the current state
of the manipulated objects. But, doing this causes a
cascade of events to occur because PropertyGrid.Refresh is
called in PictureBox.OnMouseMove (i.e., after the objects
have been manipulated), but calling PropertyGrid.Refresh
causes another PictureBox.OnMouseMove to occur.
I have tried to set a flag in an inherited PictureBox that
suspends the PictureBox.OnMouseMove method while the
PropertyGrid is refreshing, but this doesn't work because
subsequent MouseMove events can occur before the
PropertyGrid finishes refreshing.
Any ideas?
Thanks,
Lance
PropertyGrid causes a MouseMove event to occur for the
control that owns the mouse. For example, if the mouse is
over PictureBox1 when PropertyGrid1.Refresh is called,
then PictureBox1.OnMouseMove will be invoked.
This behavior is causing major problems for me because I
am tring to update a PropertyGrid whenever the user
manipulates objects that are contained within a PictureBox
so that the PropertyGrid always reflects the current state
of the manipulated objects. But, doing this causes a
cascade of events to occur because PropertyGrid.Refresh is
called in PictureBox.OnMouseMove (i.e., after the objects
have been manipulated), but calling PropertyGrid.Refresh
causes another PictureBox.OnMouseMove to occur.
I have tried to set a flag in an inherited PictureBox that
suspends the PictureBox.OnMouseMove method while the
PropertyGrid is refreshing, but this doesn't work because
subsequent MouseMove events can occur before the
PropertyGrid finishes refreshing.
Any ideas?
Thanks,
Lance