I have dynamically added 20 pictureboxes to a panel and when I use the mouse wheel, see the panel scroll I have tried to set the autoscroll to correct the panel control to implement it. Here the code is integer for I = 1 to 20:
new picture box as dim B () b.Image = nothing b.BorderStyle = BorderStyle.FixedSingle b.Text = i. ToString () b.Size = new size (60, 40) b.Location = new point (0, (i * b.Height) - b.Height) b.Parent = Panel 1 panel 1. Control. Add (B) Next
I did the same with the button control and it works just fine. I as integer = 1 to 100:
New button in the form of a dim B () b.Text = i.ToString () b.Size = new size (60, 40) b .Location = new point (0, (i * b.Height) - b.Height) b.Parent = Panel 1 panel 1. Control. Add (B) Next
This "Button" works for control, but not for "Picturebox" or "Label" controls? How can I influence scrolling using MSWill?
Panel scroll with muswell when this is the control or focus within it, the problem in which you are running It is that when you click on it, neither the picturebox nor the panel gets the focus if you call ()
on the panel, you will see that the mouse wheel starts working again Does.
A possible solution occurs when the mouse cursor selects the panel to rotate it, to deal with the control. Mouse Event:
Zero Panel 1_MouseEnter (Object) Sender, event ergues e) {panel1.select (); }
No comments:
Post a Comment