On Wed, 05 Apr 2006 21:33:37 +0200 Vincent Snijders <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote: > > On Sat, 18 Mar 2006 16:04:12 +0100 > > darekM <[EMAIL PROTECTED]> wrote: > > > > > >>[...] > >> > >>>>Index: include/customlabel.inc > >>>>=================================================================== > >>>>--- include/customlabel.inc (wersja 8956) > >>>>+++ include/customlabel.inc (kopia robocza) > >>>>@@ -39,7 +39,8 @@ > >>>> R := Rect(0,0, Width, Height); > >>>> OldFont:=SelectObject(DC, Font.Handle); > >>>> Flags:=DT_CalcRect; > >>>>- if WordWrap then inc(Flags,DT_WordBreak); > >>>>+ if WordWrap then inc(Flags,DT_WordBreak) > >>>>+ else inc(Flags,DT_SingleLine); > >>>> > >>> > >>>From > >>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcefo > >nts/html/cecondrawtext.asp: >> > >>>DT_SINGLELINE Displays text on a single line only. Carriage > >>>returns and linefeeds do not break the line. > >>> > >>>Setting DT_SINGLELINE would prohibit to use custom line breaks. > >>> > >> > >>if WordWrap=false then label should be in one line (eq. singleline), > >>calculate rectangle should care about it, > >> when not DT_SINGLELINE include, draw text is use more complicated > >part. >tLabel in most cases is single line > >>We have three cases: > >>1. single line, > >>2. multiple line divide by carriage return > >>3. multiple line divide by carriage return and anywhere - when is not > >>insufficient place > >> > >>in tLabel we have only WordWrap property, for me its not the same like > >>dt_wordWrap only differ from single and multiple line, > >>tLabel must not difference case 2 and 3, in most cases is the same, only > > > >>cases 1 and 3 > > > > > > Why should TLabel ignore user's line breaks when WordWrap=false? > > Do you think, it is this too complicated for the widgetsets? > > This patch seems to be applied in 8956, but it breaks expected > behaviour, see http://www.lazarus.freepascal.org/mantis/view.php?id=1964. > > Can I revert that patch? > > IMHO, the user can make a difference between 1 and 2 by adding > LineEndings in its text and between 1 and 3 by setting WordWrap to true. > Note that AutoSize won't enlarged the width of label, unless the longest > word doesn't fit, if you set WordWrap to true. Fixed for label and speedbutton. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives