unit prozeduren;
interface
uses
Mapi, SysUtils, Classes, IniFiles, AdvCombo, Graphics, StdCtrls, Controls, Dialogs;
procedure combobox_erstellen(Top, Left : Integer; Besitzer : TComponent; Vater : TWinControl);
procedure combobox_change(Sender : TObject);
procedure combobox_KeyPress(Sender : TObject;
var Key: Char);
procedure combobox_KeyUp(Sender : TObject;
var Key: Word; Shift: TShiftState);
Var CB : TAdvComboBox;
implementation
uses fo_haupt;
procedure combobox_erstellen(Top, Left : Integer; Besitzer : TComponent; Vater : TWinControl);
Var MyButton : TButton;
begin
CB := TAdvComboBox.Create(Besitzer);
CB.Parent := Vater;
CB.Top := Top;
CB.Left := Left;
CB.Text := '
Personen-Suche';
CB.Font.Color := clGrayText;
CB.AutoComplete := false;
CB.
Name := '
combo_Suche2';
@CB.OnChange := @combobox_change;
@CB.OnKeyPress := @combobox_KeyPress;
@CB.OnKeyUp := @combobox_KeyUp;
// @CB.OnKeyDown := @combobox_KeyUp;
end;
procedure combobox_change(Sender : TObject);
begin
if CB.Font.Color <> clBlack
then
CB.Font.Color := clBlack;
end;
procedure combobox_KeyPress(Sender : TObject;
var Key: Char);
begin
fm_haupt.label1.caption := CB.Text;
end;
procedure combobox_KeyUp(Sender : TObject;
var Key: Word; Shift: TShiftState);
begin
fm_haupt.label2.caption := CB.Text;
end;
end.