Expanding Label Control

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I posted this in general VB yesterday, and for some reason
i cannot see my post today. And I don't think it was ever
answered anyways. This is probably the one I should have
posted into to start with.

I have a form and I need to know how to have a fixed-width
label control grow in height when the text wraps to new
lines. There does not appear to be an automated way to
acomplish this like there was in VB6 (but I'm hoping I'm
wrong) by using the autosize and wordwrap properties. It
seems that Autosize will only resize the width to fit your
text. I need a way to *only* effect the height.

If I have to, I guess i could parse the text myself and
add line feeds where needed... then know to resize the
height every time I do so... but i'm thinking that there
should be a better way.

Thanks for the help!
.



Relevant Pages

  • Re: Resizing
    ... > that it will autosize to fit another screen size ... Write some startup code that reads the screen size and resize the ...
    (alt.comp.lang.borland-delphi)
  • Resizing
    ... it will autosize to fit another screen size ... I dont just want to resize the main form, ...
    (alt.comp.lang.borland-delphi)
  • RE: set textbox autoresize text setting via VBA
    ... That will autosize the textbox right? ... resize the text to fit the box not the box to fit the text. ...
    (microsoft.public.powerpoint)
  • Re: New updated WMP11 plug-in for other third party browsers
    ... not playing a video and just audio, the WMP object won't resize. ... I don't think that has any effect on the AutoSize issue. ... player resizing to just the height of the controls bar, ...
    (microsoft.public.windowsmedia)
  • Re: Listview column size
    ... I think what I'd do is autosize as I showed ... max allowable width you want to impose. ... Public Sub AutoSizeLVColumns(oLV As MSComctlLib.ListView, ... > listview would be prior to automatically resize the ...
    (microsoft.public.vb.controls)