English 中文(简体)
方框 SizeMode。 自动问题C#
原标题:picturebox SizeMode.AutoSize problem C#

我试图让用户在使用无线电台的表格上调整图像箱的规模模式财产。 它对所有大小模式、中心、动物群落、正常等都做了罚款,但当用户选择自动化时,它会发生变化,但从那里看,用户不会改用任何其他大小模式。 更确切地说,它确实如此,但它只是不工作。

因此,在任何规模模式之间,即拖车自动化工程,但一旦用户选择汽车规模,就保持汽车规模。

 else if (autoSizeViewRadio.Checked == true)
 {
     centerViewRadio.Checked = false;
     normalViewRadio.Checked = false;
     stretchViewRadio.Checked = false;
     zoomViewRadio.Checked = false;
     pictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
 }

这是用于确定面积的Imm法的一个例子。

问题回答

见MSDN。

AutoSize: The PictureBox is sized equal to the size of the image that it contains.

Source: MSDN

Since AutoSize makes the PictureBox the same size as the image itself, it won t make any sense that the user could change the size.

<代码>AutoSize系指PictureBox将适合图像。 因此,其他选择仍在发挥作用,但是它们没有明显的影响,因为<条码>PictureBox现在与图像完全相同。 在个人方面,我只想显示自动化,因为用户的底线是改变情况。

在一旁,我认为,令人奇怪的是,*Picture*SizeMode财产将改变控制的规模,但我不知道他们会把控制搁置在什么地方,而只是为这一选择创造新的财产。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签