Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 09.09.02 14:59 
hallo,
ich möchte ein bild auf einen button setzen, so das klappt ja mit dem speedbutton oder mit dem bitbtn ! Schön und gut ! Jetzt soll aber nur das bild zu sehen sein, das heißt (der button ist ja in "3D"), dass dieser effekt wegfällt. (das der rahmen vom button nicht mehr zu sehehn ist) . Beim speedbutton kann ich ja die eigenschaft flat auf true setzten.
Wenn ich aber mit dem mauscosur auf den button klicken möchte, erscheint wieder dieser rahmen ! Doch wie geht dass, dass dieser rahmen nicht angezeigt wird?wäre cool wenn mir einer helfen könnte !

mfg hibbert
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mo 09.09.02 15:09 
nimm doch eine TImage-Komponente und reagiere auf das OnClick-Ereignis.

_________________
Viele Grüße
Jakob
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 09.09.02 17:14 
ja, daran hab ich auch schon gedacht ! aber wenn der user auf den Button bzw. das bild klickt, soll es sich verändern? kann ich beim timage per clic ein neues bild laden? wenn ja, wie ??

DANKE !!!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 09.09.02 18:41 
Also TSpeeButton kennt den Style flat.
b.brecht
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mo 09.09.02 20:50 
Ja du kannst bei einer TImage Komponente ein anderes Bild reinladen:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
Image1.Picture.LoadFromFile('C:\bild2.bmp');
end;

procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
Image1.Picture.LoadFromFile('C:\bild1.bmp');
end;


Ich hoffe du verstehst wie ich das mit dem Code meine, wenn nciht frag nach ;-)

Viel Spaß!
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 09.09.02 21:50 
DANKE !!! :D :D