Autor Beitrag
moloch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Mo 04.08.08 09:04 
Hallo,
wie kann man einem Menü und oder einem BTN eine Farbe zuweisen?
Gruß
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: Mo 04.08.08 10:27 
Soweit ich weiß nur wenn man nicht die Standardkomponenten dafür benutzt.
Suche dürfte passendes hergeben.
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Mo 04.08.08 10:35 
ok danke
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Di 05.08.08 16:50 
Du nimmst statt eines Buttons ein TPanel, klickst je einmal im OI auf ONMousedown und ONMouseup und fügst dieses Hinzu:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Panel1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  panel1.BevelOuter := bvlowered;
end;

procedure TForm1.Panel1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  panel1.bevelouter := bvraised;
  //Dein Quellcode
end;


Bei Panels kann man mit color die Farbe ändern
mindtrap
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 62



BeitragVerfasst: Di 05.08.08 17:10 
user profile iconBoldar hat folgendes geschrieben:
Du nimmst statt eines Buttons ein TPanel, klickst je einmal im OI auf ONMousedown und ONMouseup und fügst dieses Hinzu:


Folgender Kommentar ist bitte nicht als Angriff zu werten, sondern als Hinweis.

Es ist nie sinnvoll Komponenten zweckzuentfremden, sonst landest du hier:
www.frankmahler.de/mshame/HallFame.htm

Leider kann ich keine Alternative anbieten. ;)
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Di 05.08.08 18:05 
user profile iconmindtrap hat folgendes geschrieben:
user profile iconBoldar hat folgendes geschrieben:
Du nimmst statt eines Buttons ein TPanel, klickst je einmal im OI auf ONMousedown und ONMouseup und fügst dieses Hinzu:


Folgender Kommentar ist bitte nicht als Angriff zu werten, sondern als Hinweis.

Es ist nie sinnvoll Komponenten zweckzuentfremden, sonst landest du hier:
www.frankmahler.de/mshame/HallFame.htm

Leider kann ich keine Alternative anbieten. ;)

Ich glaube du meinst das hier: www.frankmahler.de/mshame/Controls.htm. Dein Link ist nämlich eine Sammlung von positiven Beispielen. ([ot]Auch wenn ich die meisten davon auch eher suboptimal finde. Diese verdammten MRU-Lists, die jede geöffnete Datei protokollieren; Geheimfragen, wenn man sein Passwort vergisst - als ob nur ich den Namen meiner Grundschullehrerin finde! Keine Frage ist sicher![/ot])

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
mindtrap
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 62



BeitragVerfasst: Di 05.08.08 18:26 
Ja danke, hab den falschen Link gepostet. ^^
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Di 05.08.08 19:05 
Aber in dem Fall merkt der User den Unterschied nicht, da die Optik Gleich ist (bis auf die Farbe)!
mindtrap
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 62



BeitragVerfasst: Di 05.08.08 19:18 
Mag sein, aber dann lernt moloch ja nix. :mahn: :wink:

Btw. die Suche ist hier der beste Freund.
Gibt gute Antworten auf die Frage. Suchbegriff: Colorbutton... etc...

u.a.
www.swissdelphicente...showcode.php?id=1100

MfG
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Mi 06.08.08 07:13 
ok jungs dank euch erstmal. ich schau mir die sachen mal an oder suche..
gruß