Autor Beitrag
DissA$teR!
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Di 29.05.07 18:34 
Hallo,
ich hab eine (wahrscheinlich relativ simple) Frage, deren Lösung ich jedoch auch nach stundenlangen suchen in der Delphi-Hilfe nicht finden konnte. Wie kann man die Schrift eines Buttons unterstreichen und fett machen? Also nicht von Anfang an, sondern erst später im Programm.
Danke schonmal für eure Antworten.
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Di 29.05.07 18:35 
ausblenden Delphi-Quelltext
1:
Font.Style := [fsUnderline];					

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 29.05.07 18:38 
Oder, um den alten Stil nur zu erweitern:
ausblenden Delphi-Quelltext
1:
2:
3:
  button1.Font.Style := button1.Font.Style + [fsBold];  //fett hinzu
  button1.Font.Style := button1.Font.Style + [fsUnderline];  //unterstrichen hinzu
  button1.Font.Style := button1.Font.Style + [fsBold, fsUnderline];  //beides hinzu

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Di 29.05.07 18:41 
Dankeschön für die extrem schnellen Antworten!
Dacht ich mir ja, dass es leicht ist, aber von allein kommt man nicht drauf.
cuejo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Di 29.05.07 19:28 
Das kann man übrigens auch ganz bequem im Objektinspektor einstellen. Das sei nur der Vollständigkeit halber erwähnt :wink:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Di 29.05.07 19:59 
Mmh, tja, ich hab es jetzt erstmal probiert und es geht nicht. Ich will den Button von nem andern formular aus verändern, da brauch ich doch einfach nur form3. davor schreiben, oder?
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Di 29.05.07 20:28 
Was spricht gegen ausprobieren?

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Di 29.05.07 20:46 
Hab mich komisch ausgedrückt, ich habs schon probiert und ees geht nicht.
Nilan
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 29

Win VistaSP1

BeitragVerfasst: Di 29.05.07 22:50 
hast du die form3 schon eingebunden? in die form, die auf dieselbe, sprich form3 zugreift?

bin mir natürlich wieder selber net sicher, obs daran liegen könnte^^

bis dahin, Nilan
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: Mi 30.05.07 08:15 
ausblenden Delphi-Quelltext
1:
Form3.Buton1.Font.Style := ...					


Beim ausführen (F9) fragt er dich ob er Unit3 hinzufügen soll und da sagste ja.

Falls er nciht fragt kannste Unit3 auch manuell in die Uses-Liste setzen.

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Do 31.05.07 09:32 
Sorry, war ein Schreibfehler meinerseits. Also es funktioniert jetzt, nun hab ich aber doch noch eine Frage: Wie kann ich das Unterstreichen und fett machen dann wieder rückgängig machen?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 31.05.07 09:34 
In meinem Code einfach das "+" durch ein "-" ersetzen ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Do 31.05.07 09:49 
Danke, auf sowas simples kommt mam meistens nicht von allein.