Dyanamic文本附加在dyanamic标签上 [英] Dyanamic text append on dyanamic label

查看:117
本文介绍了Dyanamic文本附加在dyanamic标签上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://i.stack.imgur.com/YlIrR。 png [ ^ ]





上面的图片是运行时创建的dyanamic标签。

标签上的文字来自数据库

如果我通过右键点击标签添加文字,文字附在标签上



姓名:Rahul Roy

Kadam



不像上面的标签

解决方案

当您不发布当前用于填写标签文本的代码时,很难给出好的建议。如果您的数据库单独存储名字,中间名和姓氏,那么当您将文本放在标签中时,请在中间名后面添加换行符。然后是一个标签和/或将姓氏移动到NAME:结尾处的空格数,然后追加姓氏。



使用 vbNewLine [ ^ ]或 vbCRLF [ ^ ](代表回车换行)。



我认为它看起来像这样:



 lblYourLabel.Text =    NAME:&修剪(strFirstName&  & strMiddleName)& vbNewLine&  & strLastName 


http://i.stack.imgur.com/YlIrR.png[^]


the above image is of label created dyanamic on runtime.
text on label is from database
if i add text by right click on label the text is apended on label

NAME: Rahul Roy
Kadam

not like above label

解决方案

It's hard to give good advice when you don't post the code you are currently using to fill the text of the label. If your database stores first, middle, and last names seperately then when you put the text in the label, include a newline after the middle name. Then a tab and/or the number of spaces that would move the last name over to where the end of "NAME:" is, and then append the last name.

use vbNewLine[^] or vbCRLF[^] (which stands for carriage return line feed).

I assume it would look something like this:

lblYourLabel.Text = "NAME: " & Trim(strFirstName & " " & strMiddleName) & vbNewLine & "     " & strLastName


这篇关于Dyanamic文本附加在dyanamic标签上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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