0

Currently I have two panels, which programatically get PictureBoxes added to them. These PictureBoxes then have a hover event which sets the focus to its containing Panel. This allows the user to scroll up and down the picture in the Panel they're over.

However, the Scroll event for that Panel then doesn't fire, so the second Panel can't have its scroll updated to be at the same point in the (duplicate) image.

How do I go about making this event fire?

Dan
  • 1,130
  • 2
  • 20
  • 38
  • 1
    do you have any example code to show us? – Jastill Dec 04 '12 at 05:01
  • Here's adding the picturebox and adding the handler: `pba = new PictureBox(); pba.SizeMode = PictureBoxSizeMode.AutoSize; panelLeft.Controls.Add(pba); pba.MouseEnter += new EventHandler(pba_MouseEnter);` The MouseEnter then reads `panelLeft.Focus();` PanelLeft's Scroll event is then set to: `panelRight.VerticalScroll.Value = e.NewValue;` Yet the above Scroll event doesn't fire at all. – Dan Dec 04 '12 at 13:23

0 Answers0