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; |
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; |
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; |