MG: improved TComboBox.SetItemIndex

git-svn-id: trunk@3460 -
This commit is contained in:
lazarus 2002-10-04 20:46:51 +00:00
parent e850093571
commit a60a0c9584
2 changed files with 7 additions and 3 deletions

View File

@ -106,6 +106,7 @@ constructor TLazFindReplaceDialog.Create(TheOwner:TComponent);
begin
inherited Create(TheOwner);
if LazarusResources.Find(ClassName)=nil then begin
Name:='LazFindReplaceDialog';
Caption:='';
Width:=400;
Height:=266;
@ -329,7 +330,7 @@ procedure TLazFindReplaceDialog.TextToFindComboBoxKeyDown(
Sender: TObject; var Key:Word; Shift:TShiftState);
var Component: TFindDlgComponent;
begin
//writeln('TLazFindReplaceDialog.TextToFindComboBoxKeyDown Key=',Key);
//writeln('TLazFindReplaceDialog.TextToFindComboBoxKeyDown Key=',Key,' RETURN=',VK_RETURN,' TAB=',VK_TAB,' DOWN=',VK_DOWN,' UP=',VK_UP);
if (Key=VK_RETURN) then
OkButtonClick(Sender)
else if (Key=VK_ESCAPE) then

View File

@ -639,8 +639,8 @@ procedure TCustomComboBox.SetItemIndex(Val : integer);
begin
if FItemIndex = Val then exit;
FItemIndex:= Val;
if (FItemIndex>=0) and (not (csLoading in ComponentState)) then
Text:=FItems[FItemIndex];
//if (FItemIndex>=0) and (not (csLoading in ComponentState)) then
// Text:=FItems[FItemIndex];
if HandleAllocated then
CNSendMessage(LM_SETITEMINDEX, Self, Pointer(FItemIndex));
end;
@ -719,6 +719,9 @@ end;
{
$Log$
Revision 1.19 2002/10/04 20:46:51 lazarus
MG: improved TComboBox.SetItemIndex
Revision 1.18 2002/10/04 14:24:14 lazarus
MG: added DrawItem to TComboBox/TListBox