I attached a sample project.
TcxBarEditItem with TdxOfficeSearchBoxProperties no longer shows a modified NullString if TdxBarManager's AlwaysSaveText property is True
Answers approved by DevExpress Support
Hello,
Thank you for the project.
Do you mean that once you enter and erase a string, the editor no longer shows NullString? If so, this behavior is related to basic mechanisms: editor text becomes an empty string. Refer to the following discussion regarding this issue: Problem with NullString on ButtonEdit added on tdxBar. As a possible workaround, you can handle the OnChange event (it is public but not published) and assign null
explicitly.
Delphiprocedure TForm1.DoChange(Sender: TObject);
begin
if not (Sender is TdxOfficeSearchBox) then
Exit;
if TdxOfficeSearchBox(Sender).EditingText = '' then
TdxOfficeSearchBox(Sender).EditValue := null;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
TdxOfficeSearchBoxProperties(cxBarEditItem1.Properties).OnChange := DoChange;
end;
No. Just click search box with mouse and then leave it. don't push any key. you will see the exact problem.