Autor Beitrag
breakdancer1111
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Do 03.10.02 20:51 
Hallo zusammen,
habe delphi 3 proffensionel und bin auch ein anfänger. Mache grad nen txtprogramm und möchte nen button erzeugen wo mit man schrfitarten farbe und co. verändern kann. Habe RichEdit verwendet und nehme an das unter Dialoge FONTDIALOG nehmen muss, aber wie weiter? Bitte helft mir.

Bye Alex

(04.10.02 00:15 Tino) Titel geändert & Topic verschoben
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Do 03.10.02 21:22 
Hi breakdancer1111 user defined image,
mit Execute kannst du den Font-Dialog anzeigen lassen. Wenn abgebrochen wird, dann wird false zurückgegeben. Mann muss sich dann die eigenschaften vom Font-Dialog dann zum selektieren Text kopieren:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Button1Click(Sender: TObject);
begin
  if self.FontDialog1.Execute then
  begin
    RichEdit1.SelAttributes.Color  := FontDialog1.Font.Color;
    RichEdit1.SelAttributes.Size  := FontDialog1.Font.Size;
    RichEdit1.SelAttributes.Style  := FontDialog1.Font.Style;
    RichEdit1.SelAttributes.Height  := FontDialog1.Font.Height;
  end;
end;


Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
breakdancer1111 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Fr 04.10.02 14:49 
Hi Arakis,
danke für die schnelle hilfe. Nun das nächste. *grins* Ist warscheinlich genauso bescheuert die Frage. Nun das man den Text centrieren kann. Geht das auch? Wenn die Frage zu blöd ist, dann sagt mir bescheid. Naja, wie gesagt kenn mic eben nicht so gut aus.

Bye Alexander

(04.10.02 17:57 Tino) Signatur entfernt. Siehe Richtlinien.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Fr 04.10.02 16:10 
ausblenden Quelltext
1:
2:
3:
RichEdit1.Alignment := taCenter; //Zentriert
RichEdit1.Alignment := taLeftJustify; // Linksbündig
RichEdit1.Alignment := taRightJustify; // Rechtsbündig

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 04.10.02 16:16 
diese einstellung kannst du übrigens auch gleich im obejekt inspektor machen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Fr 04.10.02 16:19 
logisch :wink:

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
breakdancer1111 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Fr 04.10.02 18:24 
Ne, ich meinte das anders.
Wenn ich es im object inspektor mache, ist alles ins center gesetzt.
Ich würde es aber gerne so machen das man z.B. Den ersten satzt
recht setzt und den zweiten ins center. Aber das alles mit leerzeichen
zumachen ist a) zu dähmlich und b) zu ungenau .
Ich hoffe ihr wisst was ich meine.
breakdancer1111 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Fr 04.10.02 18:27 
Ups, da ist es ja auch schon von chatfix.
Sorry hab ich nicht bemerkt.
breakdancer1111 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Fr 04.10.02 18:29 
Klappt aber nicht.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 04.10.02 20:40 
es gibt bei RTF wie bei HTML tags um formatierungen vorzunehemen.... ich werde das mal nachschauen und dir dann sagen

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 04.10.02 21:08 
Nix Tags.

So geht's:
ausblenden Quelltext
1:
2:
3:
Richedit1.Paragraph.Alignment := taLeftJustify;
Richedit1.Paragraph.Alignment := taCenter;
Richedit1.Paragraph.Alignment := taRightJustify;
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Sa 05.10.02 14:00 
matze hat folgendes geschrieben:
es gibt bei RTF wie bei HTML tags um formatierungen vorzunehemen.... ich werde das mal nachschauen und dir dann sagen


ich glaub bei RTF nennt man das Token oder so...

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.10.02 16:30 
Ich habe matze's Posting so aufgefaßt, als ob er die Tags/Tokens manuell setzen wollte und das ist Schwachsinn.
breakdancer1111 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Sa 05.10.02 18:24 
Hi das was iht mir grad versucht zu
erklären versteh ich sowieso nicht. :D
Was sind den Tokens? Tags weiß ich ja.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.10.02 18:27 
Kuck dir mal eine rtf-Datei mit Notepad an. Dann siehst du die Tokens/Tags. Ist ähnlich wie bei HTML-Dateien.