Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 24.06.05 07:55 
Hallo, ich habe eine ComboBox! Wenn ich auf andere Componente Klicke bzw. Combo verlasse soll
Combo.Visible := False gesetzt werden aber ich muß 2 mal auf eine andere Componente Klicken
damit überhaupt deren OnClick ereigniss auftritt und da setze ich Combo.Visible := False;

Wie könnt ich's machen, dass die ComboBox beim ersten Klick irgendwo anders hin ausgeblendet wird?
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Fr 24.06.05 09:32 
Wenn Du auf eine andere Compo klickst:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.ComboBox1Exit(Sender: TObject);
begin
  ComboBox1.Visible := false;
end;


...und wenn Du auf die Form klickst:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  ComboBox1.Visible := false;
end;


gruß, jjturbo

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 24.06.05 09:45 
user profile iconjjturbo hat folgendes geschrieben:
Wenn Du auf eine andere Compo klickst:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.ComboBox1Exit(Sender: TObject);
begin
  ComboBox1.Visible := false;
end;



OK, klappt aber nicht ganz wenn Combo.DroppedDown ist muß ich immer noch 2 mal Klicken!