mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 03:40:31 +02:00
MG: improved TComboBox.SetItemIndex
git-svn-id: trunk@3460 -
This commit is contained in:
parent
e850093571
commit
a60a0c9584
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user