Autor Beitrag
scremler
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mo 09.10.06 19:17 
Hi,

wir haben in der Schule gerade Delfi und arbeiten mit der Programmversion 7.

Wir sollen eine kleine Application erstellen, bei dem ein Klick auf einen Button die Hintergrundfarbe des Programms (also von Form) ändert.

Also 4 Butons auf der Form, die selbige bei Klick auf den jeweiligen Button entweder rot, gelb etc. werden lässt.



Ich finde irgendwie keinen passenden Befehl.

Könnt ihr mir helfen.

THX.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 09.10.06 19:20 
:welcome: So z.B.:
ausblenden Delphi-Quelltext
1:
Form1.Color := clRed;					

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 09.10.06 19:22 
Das ganze dreht sich um TForm.Color.

Bei dir im Code wird das vewrmutlich Form1.Color sein. Such mal in der Delphi- Hilfe nach dieser Eigenschaft. Dann wirst du bald darauf stoßen, wie die Farben bezeichnet sind. (Oder schau mal im Objektinspector rum, da stehts auch an seiner stelle :zwinker: )

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
scremler Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mo 09.10.06 19:24 
Nach nichtmal 10 Minuten schon 2 Antworten - super Forum! :)
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 09.10.06 19:28 
user profile iconscremler hat folgendes geschrieben:
Nach nichtmal 10 Minuten schon 2 Antworten

Das ist ja noch gar nichts. :mrgreen:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot