BUG? Label with .Autosize and .Wordwrap |
Post Reply |
Author | |
SeungMina
Groupie Joined: 04 November 2010 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 23 May 2011 at 7:07am |
I am using the CodeJock label control with VB6.
With the VB6 intrinsic Label control, I can set a fixed Width so that when Autosize and Wordwrap are set, the control ONLY grows or shrinks VERTICALLY according to the Caption text. I need the same functionality from the CodeJock Label control, but I can't get it to work. Setting Autosize and Wordwrap on the CodeJock control results in unpredictable Width and Height of the control when the Caption is changed repeatedly. This can result in large areas of empty space, and it looks terrible, if any other controls are dynamically repositioned according to changes in the Label's Height (ie. changes to the word-wrapped Caption) Is this a bug? Or is there a way to make the CJ Label have a fixed width, and only grow/shrink vertically according to the word-wrapping of the Caption? |
|
SeungMina
Groupie Joined: 04 November 2010 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
CJ support gave me this workaround:
Label.AutoSize = False Label.Width=<desired width> Label.Caption=<new text> Label.AutoSize = True This works, although it didn't seem 100% successful unless I reset label height to a single line (as well as resetting width), before setting a new label caption. I still consider this a bug though. I expect word-wrapping to behave like a word processor. You expect text in a word processor to wrap at the edge of a page/column ie. at the page/column width that YOU set. Word-wrapped text expands downwards and pages are added/removed depending on the height of the word-wrapped text. Imagine if your word processor ignored your page/column widths and randomly chose its own position where word-wrapping occurs. CHAOS. A label with both word wrap and autosize, should not change its width (the place where word-wrapping occurs). And it should only resize vertically, to reveal text that has wrapped, or hide empty lines. Just like a word-processor. And this is exactly what the intrinsic VB6 label control does. My suggestion is to add a new property to the FlatEdit eg. AutoSizeVerticalOnly. This could default to False, so that any existing applications would be unaffected - but when enabled it would override current AutoSize and deliver the above behaviour. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |