How to change the size of a textbox in C#
I admit, the title sounds almost trivial. But on the second sight, it is not so easy to change the size of a TextBox control in C#, because a TextBox does not have the AutoSize property. For other controls you can set the AutoSize property to false and then change the height (height-property). For the TextBox control this is unfortunately not the case.
Nevertheless you can set the height of a TextBox by using a small workaround. The trick is as follows:
textBoxTest.Multiline = true;
textBoxTest.MinimumSize = new Size(150, 24);
textBoxTest.Size = new Size(150, 24);
textBoxTest.Multiline = false;
First you have to set the multiline property to true. Then you can adjust, according to your mood, the minimum-size and the size property to change the size of the TextBox. When you’re done, you set the Multiline property back to false. The TextBox maintains the set size just yet. It’s that simple
Who still wonders, why you should […]
I have already written about how you can enable the classic start menu in Windows 8 again. In the last article I showed you a solution with the help of the program ViStart 7. Today I want to show you another way to re-enable the classic start menu in Windows 8. This time we will make use of the program Start8 by Stardock.
Basically, I have seen so far every new Windows version rather skeptical towards. And since I’ve been here from Windows 98 on, this were a good handful of Windows versions until now. Windows 7, however, has convinced me, and until a few days ago, I was sure not to miss out any of the older versions. As I said, until a few days ago.
Today I want to briefly highlight a few alternatives to Redgates .NET Reflector. Former I frequently used this tool, but since it costs money and there are good and useful free alternatives, this is no longer between my fingers.