It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

How to extend the content of a label to multilines in VB6?

Moderator: dafunkymunky

How to extend the content of a label to multilines in VB6?

Postby BN25 on Wed Jan 25, 2006 5:14 am

Hi all,
I am working in a project in the VB6 and db2004. I have data in the table and I read these data from this table and I put them in the report form in lables. However, the data has different lengths and I have one label for employees. Sometimes, I have only one,tow,three persons and its fine to put it in the label. However, when the names of the employess reach the end border of the label, all the words and letters beind mixed and clashed and they go out beyond the label's borders. That is, ther are unreadable and confused. Specailly, I aligned the label from right-to-left and when it reaches the left border, the same lines starts the words and letters from left-to-right.
Therefore, I got problem and terrible with this case I'm thinking how to extend the lable to multilines. That is, when the content reaches the left border, it continues to the scond line and so on.
BN25
 
Posts: 4
Joined: Wed Jan 25, 2006 3:47 am

Postby dafunkymunky on Sat Jan 28, 2006 6:55 am

There is a property of the label called MULTILINE.. just make it true and also you dont know the actual no of names that are to be put in it... so obviously you want know what to set as the intitial height of label so in the code add....

label1.height=textheight(label1.caption)+10

this is how you can set the height of the label to the correct amount
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India

Postby BN25 on Sun Jan 29, 2006 5:28 am

Hi sir;
Thank you for your suggestion. However and unfortunately, this property "Multiline" is not available in the report design at all. It is available only for the textboxes and commands in the forms design. Therefore, I couldn't use it for all controls (labels, textboxes, pictures and so on) because I am working in the report design not in the forms design. Aslo, there are many propeties and functions that are not available in the report design and one of them is "textheight function".

Thank you again and I am looking for any suggestion and solution...
BN25
 
Posts: 4
Joined: Wed Jan 25, 2006 3:47 am


Who is online

Users browsing this forum: No registered users and 0 guests