![]() |
RichEdit + FontDialog
Tach erst ma!
Ich würde gerne mit einem FontDialog den Markierten Text einer RichEdit Formatieren, hab auch schon lange im Forum gesucht und viel gefunden. Troz dem funzt es nich Ich brauche Hilfeeee!!! :!:
Delphi-Quellcode:
Das programm startet zwar, aber der markierte Text verändert sich nich
If FontDialog.Execute
Then With Rich.SelAttributes do begin Font := FontDialog.Font; Font.Style := FontDialog.Font.Style; Font.Color:= FontDialog.Font.Color; end; Danke im Vorraus :? P.S.: ich komm mir wie n absoluter Anfänger vor :cry: |
Re: RichEdit + FontDialog
Ich noch ma,
Delphi-Quellcode:
funzt auch nich :cry:
Font.Name := FontDialog.Font.Name;
Das einzige, das ich bisher hingegriegt habe ist "size" ich will aber alle werte des Dialoges übernehmen; |
Re: RichEdit + FontDialog
:hi:
Im Demo Ordner von Delphi hat es ein Demoprogramm über das RichEdit. mfg Tobias Edit : Hab mich geirrt, die Demo wird Dir wohl nicht helfen |
Re: RichEdit + FontDialog
Hallo
gugg doch einfach mal in die Onlinehilfe oder nutz die Codevervollständigung. Selattributes hat keine Font-Eigenschaft. du gibst nur den Namen, Size etc. an.
Delphi-Quellcode:
das was du da rumänderst, wenn du Font.??? verwendest wird wohl der Font der Form sein. Und wenn es mit der Größe geklappt hat, dann haben sich auch alle Schriftgrößen deiner ganzen Kompos auf der Form mitgeändert, wenn dur parentfont auf true stehen hast.
if FontDialog1.Execute then
begin RichEdit1.SelAttributes.Name := FontDialog1.Font.Name; ... end; Mfg Frank |
Re: RichEdit + FontDialog
:dancer: Danke für Eure Tips, ich habs zum Laufen gekriegt :dancer2:
|
Re: RichEdit + FontDialog
oook bei mir ist es andersherum.... ich bekomm es mit der schriftart hin... aba size und fett,kursiv und unterstrichen geht nicht.... das nervt.... wie haste es denn da hin bekommen?
|
Re: RichEdit + FontDialog
das geht doch genauso :roll:
Delphi-Quellcode:
Mfg Frank
if FontDialog1.Execute then
begin ... RichEdit1.SelAttributes.Style := FontDialog1.Font.Style; RichEdit1.SelAttributes.Size := FontDialog1.Font.size; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:02 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz