Autor Beitrag
mrmaus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mo 28.11.05 11:09 
hallo,

ich suche eine Kategorie in Delphi, wobei ich nicht einmal weiß ob diese auch im Standard integriert ist oder ob es überhaupt ein solches Controllitem gibt. Das Item sollte rechtecke (mit Farbfüllung) darstellen, welche nach einem Doppelklick verschwinden oder nur noch eine schwarze Umrandung sichtbar ist. Ich habe diese Form schon in einigen Programmen gesehen aber noch nie als Controll in Delphi. Vielleicht kennt einer ein solches Controll für Delphi oder wie soetwas zu realisieren ist. Danke
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Mo 28.11.05 14:48 
Hallo,

wenn ich Dich richtig verstanden habe, kann man das z.B. mit einem Panel realisieren.
Mit einem Panel hättest Du ein Rechteck bei dem Du die Farbe frei wählen kannst und auch auf einen Doppelklick reagieren kannst.

Zu Test kannst Du ja mal einen Button und ein Panel auf ein Formular setzen und dann folgenden Code probieren.
OnClick Ereigniss des Button:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
 Panel1.Color := clred;
end;

OnDblClick des Panel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Panel1DblClick(Sender: TObject);
begin
 Panel1.Color := clGray;
end;


Wenn Du dann auf den Button klickst dann wird das Panel Rot und wenn Du dann einen Doppelklick af das Panel machst ist es grau.

Ich hopffe damit habe ich dein Problem richtig interpretiert.

_________________
mfg Henry
mrmaus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Di 29.11.05 11:10 
Vielen Dank, genau das hatte ich gesucht.
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Di 29.11.05 19:16 
Hallo,

kein Problem, viel Spass damit.

_________________
mfg Henry