Autor Beitrag
chriss1988
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:00 
wie schon oben genannt weis ich net wie man die schriftarbe von buttons ändern kann.
weis jemand wie das geht oder geht das net.


Moderiert von user profile iconGausi: Topic aus Sonstiges verschoben am Mi 07.12.2005 um 15:14
Moderiert von user profile iconTino: Titel geändert.
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mi 07.12.05 15:03 
ausblenden Delphi-Quelltext
1:
button1.font.color := clwhite;					
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:06 
aha und wo muss ich das hin setzen
das
ausblenden Delphi-Quelltext
1:
button1.font.color := clwhite;					
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 07.12.05 15:08 
Wann soll sich denn die Farbe des Buttons ändern? Bei einer speziellen Aktion, oder schon von Anfang an?

_________________
We are, we were and will not be.
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:10 
oh sorry das hab ich ganz vergessen
natürlich von anfang an
JayK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1013



BeitragVerfasst: Mi 07.12.05 15:11 
Im Objektinspektor auf die Eigenschaft Font und dadrin (aufklappen) Color ;)
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mi 07.12.05 15:11 
Dann wenn du's brauchst,natürlich.
Ich war irgendwie davon ausgegangen, dass du das gerne zur Laufzeit machen willst. Wenn du also z.B. auf nen Button klicken willst, um die Farbe zu ändern, kommt das ins OnClick des Buttons.
Wenn du das aber schon vorher fest vorgeben willst, markier doch mal den Button und schau dir mal den Objektinspector an. Da gibts doch glatt die Option "Font" da klickste drauf (ein mal zum Markieren und dann nochmal auf die ... daneben) und - siehe da - da macht sich ein Fenster auf, wo du alles mögliche zur Schriftart auswählen kannst.

Edit:
Da war ich wohl ein bisschen zu langsam...
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:16 
das klappt aber leider netich sag dem unter font farbe rot und er bringt trotzdem schwarz
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 07.12.05 15:18 
Schlaumeier. Schon mal selber ausprobiert? TButton kennt zwar diese Eigenschaft, hat aber keinerlei Auswirkung auf die Schaltfläch,
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mi 07.12.05 15:18 
dann probier doch mal, meinen schnippsel von oben ins formcreate reinzupacken, ob's dann villeicht geht...

Edit:
Da scheint Luckie wohl recht zu haben... :oops:
Habs noch nie ausprobiert, wusste aber,dass die Option da is... wer geht denn dann davon aus, dass die's nich tut?!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 07.12.05 15:24 
Derjenige, der diese Stelle aus dem PSDK kennt:
Zitat:

By default, the DefWindowProc function selects the default system colors for the button. Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face, highlight and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom appearance for push buttons, use an owner-drawn button.

Da geht es zwar nicht um die Schrift aber die Vermutung liegt nahe, dass auch die Schriftfarbe nicht so einfach geändert werden kann.
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:25 
ne funktioniert leider auch net
was ... da scheitert das programm an sowas wer schreibt solche programme :autsch:
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mi 07.12.05 15:27 
user profile iconLuckie hat folgendes geschrieben:
Derjenige, der diese Stelle aus dem PSDK kennt:


Da gehör ich dann wohl nicht zu...

@chriss
Vielleicht kannst du ja ein Panel o.ä. zu deinen Zwecken "missbrauchen"?! Die können dat nämlich wirklich *100%ig davon überzeugt is* ;)
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:29 
einen panel anstelle eines buttons oder wie meinst das
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 07.12.05 15:30 
Gruss !
Nimm ein BitButton bei dem gehts.
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:32 
user profile iconBlackheart666 hat folgendes geschrieben:
Gruss !
Nimm ein BitButton bei dem gehts.



was isn en bitbutton
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mi 07.12.05 15:33 
Zusätzliche Komponenten -> der Button mit dem grünen Haken wo "OK" drauf steht...
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 07.12.05 15:34 
stimmt danke jetzt geht es