c# 4.0 - Autoresizing picturebox in Winforms -
I have a pitiful problem with window needs in windowshop. The document outline is like this:
- TableLayoutPanel
- groupbox1
- Panel 1
- Panel 2 (AutoSize = true, doc =
- Ul>
- Picturebox (dot = fill, there is no autosave property for that control)
is important Panel 2 and what I have to do is load an image in the image box and I want to scale it (if the table layout is large for the panel window that I want to scroll down What am I doing wrong? Now the size of the picture box is always 0,0, so the image is not showing.
property SizeMode
first in the Picture box.
< Code> pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
The second thing when you choose to resize control dock property according to client control, set to fillThe size of the control will be set indirectly at the size of its original client area. Therefore, you must delete both control image boxes and groupboxes of the dock property. Because the autoscroll bar property you have enabled is in panel 2 when the size of the image changes, then the group size should be changed.
Comments
Post a Comment