implemented TComboBox dropdown from Yoyong

git-svn-id: trunk@4252 -
This commit is contained in:
mattias 2003-06-10 13:35:54 +00:00
parent 3ba87e0a48
commit a5cac5fc10
2 changed files with 22 additions and 0 deletions

View File

@ -364,6 +364,20 @@ begin
end;
end;
procedure TCustomComboBox.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if AutoDropDown then
begin
case Key of
VK_TAB,VK_RETURN:
DroppedDown := False;
else
DroppedDown := True;
end;
end;
end;
{------------------------------------------------------------------------------
function TCustomComboBox.SelectItem(const AnItem: String): Boolean;
@ -736,6 +750,9 @@ end;
{
$Log$
Revision 1.27 2003/06/10 13:35:54 mattias
implemented TComboBox dropdown from Yoyong
Revision 1.26 2003/06/07 09:34:21 mattias
added ambigius compiled unit test for packages

View File

@ -240,6 +240,7 @@ type
procedure SetSelText(const Val : string); virtual;
procedure SetSorted(Val : boolean); virtual;
procedure SetStyle(Val : TComboBoxStyle); virtual;
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
property DropDownCount: Integer read
FDropDownCount write SetDropDownCount default 8;
@ -287,6 +288,7 @@ type
property ItemIndex;
published
property Anchors;
property AutoDropDown;
property Ctl3D;
property DropDownCount;
property Enabled;
@ -1450,6 +1452,9 @@ end.
{ =============================================================================
$Log$
Revision 1.93 2003/06/10 13:35:54 mattias
implemented TComboBox dropdown from Yoyong
Revision 1.92 2003/06/07 09:34:21 mattias
added ambigius compiled unit test for packages