Delphi,标签最大字符

Delphi,标签最大字符,第1张

概述TLabel的最大字符数为255(ShortString),但我还需要更多.我该怎么用? 不,没有限制.我只是尝试使用一个1223个字符的字符串作为TLabel的标题,这是有效的.但是,在代码中,字符串文字不能超过255个字符.但这不是问题.做就是了 Label1.Caption := 'This is a test. This is a test. This is a test.' + ' TLabel的最大字符数为255(ShortString),但我还需要更多.我该怎么用?解决方法 不,没有限制.我只是尝试使用一个1223个字符的字符串作为TLabel的标题,这是有效的.但是,在代码中,字符串文字不能超过255个字符.但这不是问题.做就是了

Label1.Caption := 'This is a test. This is a test. This is a test.' +   'This is a test. This is a test. This is a test. This is a test.' +  'This is a test. This is a test. This is a test. This is a test.' +  'This is a test. This is a test. This is a test. This is a test.' +  'This is a test. This is a test. This is a test. This is a test.' +  'This is a test. This is a test. This is a test. This is a test.' +  'This is a test. This is a test. This is a test. This is a test.';

您可以根据需要制作标题,但是单个字符串文字,源代码中的文本在’和’之间,不能超过255个字符.要构造一个更长的字符串,使用字符串连接运算符()来连接较短的字符串文字.

总结

以上是内存溢出为你收集整理的Delphi,标签最大字符全部内容,希望文章能够帮你解决Delphi,标签最大字符所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1268893.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-08
下一篇2022-06-08

发表评论

登录后才能评论

评论列表(0条)

    保存