I'm working on a new feature that allow the user to follow foreign key to the reference table and filter to show only rows linked from the current row (https:// github.com /HeidiSQL/HeidiSQL/pull/1571). Since I'm not familiar with Delphi and Pascal, there is a problem I can't resolve now.
I'm trying to set the filter after switching to the reference table from the foreign key. But the filter text only appears in Recent filters. I guess there's something that load the filter text from filter history whenever I switch to another table.
Here's the code I wrote:
SynMemoFilter.UndoList.AddGroupBreak;
SynMemoFilter.SelectAll;
SynMemoFilter.SelText := ForeignColumnName + ' = "' + TextCopy + '"';
// SynMemoFilter.Text := ForeignColumnName + ' = "' + TextCopy + '"';
actApplyFilter.Execute;
// actApplyFilterExecute(nil);
The commented code is the alternative code which also doesn't work.
@ansgar Can you give me some tips to handle this?