How do UndelineMode & UnderlienColor ?
it's my Code :
....
Finder.FoundAttr.SetColor(clRed); {..has efect}
Finder.FoundAttr.SetUnderlineMode(WPUND_Doublewave); {no effect}
Finder.FoundAttr.SetUnderlineColor(clGreen); {no effect}
......
Why does not work ?
UnderlineMode, UnderlineColor
-
-
- Offizieller Beitrag
They were broken inV5.14 but, yes, in WPTools 5.15 they are fully operational:
This code creates a little demo output. It uses the latest methods to create text and apply properties.
Code
Alles anzeigenprocedure TForm1.ShowPossibleULClick(Sender: TObject); const cnames : array[1..18] of string = ('WPUND_Standard' ,'WPUND_Dotted' ,'WPUND_Dashed' ,'WPUND_Dashdotted' ,'WPUND_Dashdotdotted' ,'WPUND_Double' ,'WPUND_Heavywave' ,'WPUND_Longdashed' ,'WPUND_Thick' ,'WPUND_Thickdotted' ,'WPUND_Thickdashed' ,'WPUND_Thickdashdotted' ,'WPUND_Thickdashdotdotted' ,'WPUND_Thicklongdashed' ,'WPUND_Doublewave' ,'WPUND_WordUnderline' ,'WPUND_wave' ,'WPUND_curlyunderline'); var i : Integer; begin WPRichText1.Clear; WPRichText1.CheckHasBody; WPRichText1.WritingAttr.Clear('Verdana',10); WPRichText1.InputString('The modes are applied with' + #10 + 'WPRichText1.WritingAttr.SetUnderlineMode(x)' + #13 + #13); WPRichText1.WritingAttr.ASet(WPAT_BorderFlags,WPBRD_DRAW_All4); WPRichText1.WritingAttr.LockBorder; WPRichText1.WritingAttr.ASet(WPAT_IndentLeft,720); WPRichText1.WritingAttr.ASet(WPAT_IndentFirst,288); WPRichText1.WritingAttr.ASet(WPAT_Indentright,3600); WPRichText1.InputString(#13); WPRichText1.WritingAttr.SetColor(clGray); WPRichText1.WritingAttr.SetUnderlineColor(clRed); for i:=1 to 18 do begin WPRichText1.WritingAttr.SetUnderlineMode(i); WPRichText1.InputString(cnames[i]+#13); end; WPRichText1.WritingAttr.SetUnderlineMode(-1); WPRichText1.WritingAttr.SetUnderlineColor(clNone); // After UnlockBorder the border will be closed with the next // new paragraph WPRichText1.WritingAttr.UnlockBorder; WPRichText1.InputString(#13); WPRichText1.WritingAttr.ADel(WPAT_IndentLeft); WPRichText1.WritingAttr.ADel(WPAT_IndentFirst); WPRichText1.WritingAttr.ADel(WPAT_Indentright); WPRichText1.WritingAttr.SetColor(clBlack); WPRichText1.InputString(#13 + 'The colors have been changed with' + #10 + 'WPRichText1.WritingAttr.SetColor(clGray);' +#10 + 'WPRichText1.WritingAttr.SetUnderlineColor(clRed);' + #13 + #13); end;