Changeset 460 for trunk/Packages/CevoComponents/DrawDlg.pas
- Timestamp:
- Nov 28, 2023, 3:16:24 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/DrawDlg.pas
r447 r460 46 46 Lines: Integer; 47 47 TopSpace: Integer; 48 procedure SplitText( preview: boolean);48 procedure SplitText(Preview: Boolean); 49 49 procedure CorrectHeight; 50 50 end; … … 206 206 procedure TDrawDlg.InitButtons; 207 207 var 208 cix: integer;208 cix: Integer; 209 209 // ButtonDownSound, ButtonUpSound: string; 210 210 begin … … 228 228 procedure TDrawDlg.SmartInvalidate; 229 229 var 230 i: integer;230 i: Integer; 231 231 r0, r1: HRgn; 232 232 begin … … 240 240 DeleteObject(r1); 241 241 end; 242 InvalidateRgn(Handle, r0, false);242 InvalidateRgn(Handle, r0, False); 243 243 DeleteObject(r0); 244 244 end; … … 260 260 procedure TBaseMessgDlg.FormPaint(Sender: TObject); 261 261 var 262 i, cix: integer;262 i, cix: Integer; 263 263 begin 264 264 if csDesigning in ComponentState then Exit; 265 PaintBackground( self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border),265 PaintBackground(Self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border), 266 266 ClientHeight - (6 + 2 * Border)); 267 267 for i := 0 to Border do … … 274 274 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 275 275 MainTexture.ColorBevelShade); 276 SplitText( false);276 SplitText(False); 277 277 278 278 for cix := 0 to ControlCount - 1 do … … 281 281 end; 282 282 283 procedure TBaseMessgDlg.SplitText( preview: boolean);284 var 285 Start, Stop, OrdinaryStop, LinesCount: integer;283 procedure TBaseMessgDlg.SplitText(Preview: Boolean); 284 var 285 Start, Stop, OrdinaryStop, LinesCount: Integer; 286 286 s: string; 287 287 begin … … 294 294 (BiColorTextWidth(Canvas, Copy(MessgText, Start, Stop - Start + 1)) < 295 295 ClientWidth - 56) do 296 inc(Stop);296 Inc(Stop); 297 297 if Stop <> Length(MessgText) then 298 298 begin … … 303 303 (MessgText[OrdinaryStop + 1] = '\'); 304 304 if (OrdinaryStop + 1 - Start) * 2 >= Stop - Start then 305 Stop := OrdinaryStop 306 end; 307 if not preview then305 Stop := OrdinaryStop; 306 end; 307 if not Preview then 308 308 begin 309 309 s := Copy(MessgText, Start, Stop - Start + 1); … … 313 313 end; 314 314 Start := Stop + 2; 315 inc(LinesCount) 316 end; 317 if preview then315 inc(LinesCount); 316 end; 317 if Preview then 318 318 Lines := LinesCount; 319 319 end; … … 321 321 procedure TBaseMessgDlg.CorrectHeight; 322 322 var 323 i: integer;323 i: Integer; 324 324 begin 325 325 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;
Note:
See TracChangeset
for help on using the changeset viewer.