ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/ibcontrols/IBLookupComboEditBox.pas
(Generate patch)

Comparing ibx/trunk/ibcontrols/IBLookupComboEditBox.pas (file contents):
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC vs.
Revision 266 by tony, Wed Dec 26 18:34:32 2018 UTC

# Line 124 | Line 124 | type
124      procedure Change; override;
125      procedure CloseUp; override;
126      procedure Select; override;
127    procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
127      {$ifend}
128      procedure KeyUp(var Key: Word; Shift: TShiftState); override;
129      procedure Loaded; override;
# Line 594 | Line 593 | type
593  
594    THackedCustomComboBox = class(TCustomComboBox)
595    private
597    procedure CallUTF8KeyPress(var UTF8Key: TUTF8Char);
596      procedure CallChange;
597    end;
598  
599   { THackedCustomComboBox }
600  
603 procedure THackedCustomComboBox.CallUTF8KeyPress(var UTF8Key: TUTF8Char);
604 begin
605  inherited UTF8KeyPress(UTF8Key);
606 end;
607
601   procedure THackedCustomComboBox.CallChange;
602   begin
603    inherited Change;
604   end;
605  
613 procedure TIBLookupComboEditBox.UTF8KeyPress(var UTF8Key: TUTF8Char);
614 begin
615  {TDBLookupComboBox.UTF8KeyPress will swallow the character if
616  the datalink is not editable. hence to enable writing we must override it}
617  if ((DataSource = nil) or (Field = nil)) and not ReadOnly then
618    THackedCustomComboBox(self).CallUTF8KeyPress(UTF8Key)
619  else
620    inherited;
621 end;
622
606   procedure TIBLookupComboEditBox.Change;
607   begin
608    THackedCustomComboBox(self).CallChange;
# Line 641 | Line 624 | function TIBLookupComboEditBox.DoEdit: b
624   begin
625    {DoEdit will swallow characters if no editable Field. Hence, to enabled
626     writing we must avoid calling the inherited method.}
627 <  if ((DataSource = nil) or (Field = nil)) and not ReadOnly then
627 >  if IsUnbound then
628      Result := true
629    else
630      Result := inherited DoEdit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines