Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change TJvDBComboBox search to be case sensitive #128

Merged
merged 5 commits into from May 28, 2019
@@ -143,6 +143,8 @@ TJvCustomDBComboBox = class(TJvCustomComboBox, IJvDataControl)
procedure CMGetDataLink(var Msg: TMessage); message CM_GETDATALINK;
procedure WMPaint(var Msg: TWMPaint); message WM_PAINT;
procedure SetListSettings(const Value: TJvDBComboBoxListSettings);
procedure SetCaseSensitiveSearchValue(Value: Boolean);
function GetCaseSensitiveSearchValue: Boolean;
This conversation was marked as resolved by obones

This comment has been minimized.

Copy link
@obones

obones May 22, 2019

Member

Getters and Setters must be named after their associated property. In this case this means SetCaseSensitiveValues and GetCaseSensitiveValues

protected
function GetDataLink: TDataLink;

@@ -188,6 +190,7 @@ TJvCustomDBComboBox = class(TJvCustomComboBox, IJvDataControl)
property Text;
property UpdateFieldImmediatelly: Boolean read FUpdateFieldImmediatelly write FUpdateFieldImmediatelly default False;
property PreserveItemSelectionOnInsert: Boolean read FPreserveItemSelectionOnInsert write FPreserveItemSelectionOnInsert default False;
property CaseSensitiveValues: Boolean read GetCaseSensitiveSearchValue write SetCaseSensitiveSearchValue default false;
end;

{$IFDEF RTL230_UP}
@@ -240,6 +243,7 @@ TJvDBComboBox = class(TJvCustomDBComboBox)
property UpdateFieldImmediatelly;
property Values;
property Visible;
property CaseSensitiveSearch;
This conversation was marked as resolved by obones

This comment has been minimized.

Copy link
@obones

obones May 22, 2019

Member

This cannot compile, it's not named the same as in the ancestor class

property ListSettings; { should be published after Items and Values }
property OnChange;
property OnClick;
@@ -371,6 +375,11 @@ procedure TJvCustomDBComboBox.UpdateData(Sender: TObject);
FDataLink.Field.AsString := ComboText;
end;

procedure TJvCustomDBComboBox.SetCaseSensitiveSearchValue(Value: Boolean);
begin
FValues.CaseSensitive := Value;
end;

procedure TJvCustomDBComboBox.SetComboText(const Value: string);
var
I: Integer;
@@ -410,6 +419,11 @@ procedure TJvCustomDBComboBox.SetComboText(const Value: string);
end;
end;

function TJvCustomDBComboBox.GetCaseSensitiveSearchValue: Boolean;
begin
result := FValues.CaseSensitive;
This conversation was marked as resolved by obones

This comment has been minimized.

Copy link
@obones

obones May 22, 2019

Member

Result takes a leading capital letter

end;

function TJvCustomDBComboBox.GetComboText: string;
var
I: Integer;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.