The setup:
Place a TToggleBox and TRichMemo on a form
In the ToggleBox's change event, put:
procedure TForm1.ToggleBox1Change(Sender: TObject);
var
fn: TFontParams;
begin
if ToggleBox1.Checked then
begin
RichMemo1.GetTextAttributes(RichMemo1.SelStart, fn);
fn.Style := fn.Style+[fsBold];
RichMemo1.SetTextAttributes(RichMemo1.SelStart, RichMemo1.SelLength, fn);
end;
end;
Run the application. Move the cursor to be after the text "RichMemo1". Press the ToggleBox to trigger bold text formatting. Type text.
EXPECTED: additional text typed after "RichMemo1" is bold. This happens correctly on Windows. This does not work in Linux/GTK2.
(See attachment for pic if there's confusion)
Using latest code from SVN on both Windows and Linux. (Also: Lazarus 1.8.4, not that I think that matters)