Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Label Autosize

Status
Not open for further replies.

astrodestino

IS-IT--Management
Feb 19, 2005
179
AR
Hi!
I got a label in a panel, the label was created during runtime.
THe label anchor is top, left and right.
The label texts comes form a rs field but the text if it is long and the label autosize is true will force the label width to be widther than the panel and text will be lost. If I set the label.autosize=false if the text exceeds 2 lines text will be lost.
How can I autosize it vertically if label.width > panel6.width?
Thank you!!
 
autosize set it to false
then the height should be very big, e.g equal to the panel's height.
As the label is in the panel, set its anchor also to bottom.

-
 
or leave autosize = true and in the resize event check to make sure the size is smaller then the panel size.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Tnk for the reply...
THe label has not the height of the panel, I got several labels in the panel...
What I'm trying to do is to show:

Title
Date
News

Title & date are 1 line label the problem is with the news label cause it may have several lines.
So I one panel I do loop and I create those 3 labels by code and put it one below the other, then the panel will show the scrolling bar but I cant set the new label height automatically :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top