自定义文本框问题 [英] customize text box issue

查看:80
本文介绍了自定义文本框问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更改自定义文本框的属性时出现问题.我现在创建了一个自定义文本框,我想默认垂直更改其长度,默认垂直长度为3510,并开始自动换行,这是我想通过自己的自编码方式赋予其长度,但是不知道如何编码以提供垂直长度自定义C#中的文本框


plzzzz帮助我解决此问题

i ve problem in changing the properties of customize text box. i made an customize text box now i want to change its length vertically by default its vertical length is 3510 and it starting word wraping aftr this i want to give it length by my own self coding but no idea how to code to give vertical length in customize text box in c#


plzzzz help me about this issue

推荐答案

文本框具有length属性,不是吗?还是那不是你的意思?您的问题是否在衡量输入文本的位置?您可以使用Graphics对象和MEasureString方法来执行此操作.
The textbox has a length property, doesn''t it ? Or is that not what you mean ? Is your issue measuring the position of the text entered ? You can use a Graphics object and the MEasureString method to do that.


如果要从TextBox继承,则应具有MultiLine属性,如果将该属性设置为true,则该属性可以您可以设置控件的高度(我将其垂直宽度表示高度).

希望对您有帮助
If you are inheriting from TextBox then you should have a MultiLine property, which, if set to true, would allow you to set the height (i take it vertical width means height) of the control.

Hope this helps


这篇关于自定义文本框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆