-
Load text to advRE: line break adapts when moving the splitter (image 1)
-
Highlight advRE
-
Move splitter to the left: text cropped! (image 2)
A demo is appended:
advREScrollB1.zip (79.2 KB)
Best regards
HG Kneip
Load text to advRE: line break adapts when moving the splitter (image 1)
Highlight advRE
Move splitter to the left: text cropped! (image 2)
A demo is appended:
advREScrollB1.zip (79.2 KB)
Best regards
HG Kneip
Your project you included is missing files and has a wrong structure
Good evening Mr. Fierens. My mistake with the wrong files :-((. Another upload; I hope with the correct files. Best regards HG Kneip
Scrollbars AdvRE.zip (80.4 KB)
In your code, you do:
ARE := fadvRE;
ARE.EndUpdate;
ARE.BeginUpdate;
I do not get why you would do this.
When I change your code to what makes sense, i.e. :
procedure TForm8.DoHL(fadvRE: TAdvRichEditor; fRow: integer);
var
ida: TIntegerDynArray;
iObjVal, iColor, iSizePlus, iLine: integer;
i, t, h, w, c, col, row, irow, selrow, iIndex, iCountElt, iPos: integer;
ARE: TAdvRichEditor;
AColor, ABgColor, ATextColor, AInvColor: TColor;
sTextCells, sCell, sColname, sHLTerm, sUCHLTerm, sSel, sTextFields, sHLT, sHLTFat, sPhrase: string;
litmp, liText, liHLFat: TStringlist;
begin
irow := fRow;
if liHL.Count = 0 then
exit;
ARE := fadvRE;
ARE.BeginUpdate;
for h := 0 to liHL.Count - 1 do
begin
sHLTerm := liHL[h];
AColor := (TColor(liHL.Objects[h]));
ABgColor := AColor;
AInvColor := clBlack;
ATextColor := AInvColor;
//ARE.BeginUpdate;
if ARE.FindFirst(sHLTerm, false) then
begin
sSel := ARE.Caret.Element.Text;
// ARE.SetSelectionFontName('Courier New');
ARE.SetSelectionBold(true);
// Doc Ende nicht per Scrollbar erreichbar: kein Update
// if RB_HLText.Checked then
// ARE.SetSelectionUnderLine(true);
ARE.SetSelectionColor(ATextColor);
ARE.SetSelectionBkColor(ABgColor);
while ARE.FindNext do
begin
sSel := ARE.Caret.Element.Text;
// ARE.SetSelectionFontName(DocFont.Name);
ARE.SetSelectionBold(true);
// if RB_HLText.Checked then
// ARE.SetSelectionUnderLine(true);
ARE.SetSelectionColor(ATextColor);
ARE.SetSelectionBkColor(ABgColor);
end;
end;
end;
//ARE.EndUpdate; // Programm bleibt hier hängen ?!?
Application.ProcessMessages;
Screen.Cursor := crDefault;
ARE.EndUpdate;
end;
This works as expected.
Also when I use the ARE.EndUpdate before Application.ProcessMessages, this works.
Dear Mr. Fierens. Thank you very much. Everything works like expected now. I must have been blind not to see my mistake myself :-((. Best regards HG Kneip