The property value of the control, a problem that is not very small

xiaoxiao2021-03-05  23

In the .NET development environment:

We created a control, but did not set it. There is no doubt that in order to display it, it must have a default size.

In order to get the default size of a control, we might consider creating a look and getting the size of its size.

For example, a TextBox, we create an ID for TextBox1, then view:

INT i = textbox1.width;

To get its size. Unfortunately, last i = 0. This may be an accident for some people, do not pay attention to this sometimes cause trouble during development.

转载请注明原文地址:https://www.9cbs.com/read-36178.html

New Post(0)