Autor Beitrag
ähM_Key
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88

Windows XP Professional
D7 Enterprise
BeitragVerfasst: Mi 26.11.03 18:42 
Hi!

ich frage am best lieber gleich so: Was muss ich in der Suche eingeben, um zu folgendem Egrebniss zu kommen: :?

Ich möchte auf einen Button drücken, und er soll unten bleiben (grafisch gesehen), wenn der Klick beendet ist (MouseUp). Erst wenn ich nochmal draufklicke soll er wieder hochkommen! Also vom Prinzip her sowas wie eine CheckBox nur halt im Button-Outfit!

Danke für Hilfe; Grüße; ähM_Key

_________________
Alles geht ni! Aber ein bissl' was muss!
Mossi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 99
Erhaltene Danke: 2

Win XP, Linux
D7 Enterprise, K3 Prof
BeitragVerfasst: Mi 26.11.03 20:35 
Nur mal so als Idee. Ich weiß zwar nicht, ob du damit auf dein gewünschtes Ergebnis kommst, aber es könnte zumindest ein Ansatz sein:

Nimm dir ein Panel und setze beim Click die Bordereigenschaften. damit kannst du den Effekt erzielen, dass das Panel einmal erhöht und einmal vertieft ist.
Ich kann mich auch erinnern, dass ich eine entsprechende Komponente schon einmal irgendwo gesehen habe, find's aber auf Anhieb nicht. Es hat jedenfalls irgendwas mit "StateButton" oder so zu tun.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 26.11.03 21:04 
Einfacher geht's so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
const
{$j+}bPushed : Boolean = True;{$j-}
begin
  Button1.Perform(BM_SETSTATE,Ord(bPushed),0);
  bPushed := not bPushed;
end;
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: Do 27.11.03 21:10 
Titel: Geht das nicht einfacher ?
Hi,

Hmm nur mal ne Frage:

Hab ich da jetzt was übersehen in der Fragestellung, oder hat nicht ein BitButton, oder SpeedButton genau diese Eigenschaften ?
Wozu also halbseiden mit Panels rumbasteln....?

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
ähM_Key Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88

Windows XP Professional
D7 Enterprise
BeitragVerfasst: Do 27.11.03 21:27 
Ne, also diese Buttons kommen auch wieder hoch!

Der Sourccode von Toms müsste das Prob. lösen!

MK

_________________
Alles geht ni! Aber ein bissl' was muss!
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 28.11.03 07:51 
Speedbutton:
allowup auf true und Groupindex >0 stellen. Steht auch in der Hilfe, wenn man sich die eigenschaft down anguggt.

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)