Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   DB Memo Text Abstand zum Rand (https://www.delphipraxis.net/159803-db-memo-text-abstand-zum-rand.html)

kumar89 13. Apr 2011 14:00

DB Memo Text Abstand zum Rand
 
Sers @ all,

Ich hab folgendes Problem:

Ich hab auf meinem Formular ein DBMemo, da mein Formular farbig gestaltet ist, sieht mein Text in DB Memo Feld zu breit aus und möchte daher, das ich mein Text bisschen Rücken könnte also Abstand zum oberen Rand vom DBMemo und zum linken Rand.
Gibts da ein bestimmten Befehl dazu?
Unter Eigenschaften hab ich dazu nichts gefunden.

Könnt ihr mir bitte helfen? :)


Danke im vorraus


Kumar

roga 13. Apr 2011 14:20

AW: DB Memo Text Abstand zum Rand
 
Ich hatte das mal für ein DBRichEdit geschrieben, müsste eigentlich für ein DBEdit genauso funktionieren:

Delphi-Quellcode:
procedure SetDBMemoTextRect(ADBMemo: TDBMemo; WLeft, WTop: integer);
var
  R: TRect;
begin
   ADBMemo.Perform(EM_GETRECT, 0, LongInt(@R));
   R.Left := WLeft;
   R.Right := ADBMemo.ClientWidth - WLeft;
   R.Top := WTop;
   R.Bottom := ADBMemo.ClientHeight - WTop;
   ADBMemo.Perform(EM_SETRECT, 0, LongInt(@R));
   ADBMemo.Refresh;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz