Recent

Author Topic: THTMLViewer.SelText .SelStart not working  (Read 1187 times)

RedOctober

  • Sr. Member
  • ****
  • Posts: 414
THTMLViewer.SelText .SelStart not working
« on: May 25, 2021, 04:21:06 pm »
Platform:  Lazarus 2.0.10, FPC 3.2, THTMLViewer 11.8.0.0

I want to copy only the selected text from the THTMLViewer.  However, the ".sel" functions return nothing. 

Example, just to show the problem.  (This is not what I wd do normally) 

Hold down your mouse button, then use your mouse cursor to select some text, then let go of the mouse button.

Code: Pascal  [Select][+][-]
  1. procedure TfrmMain.htmVwrChartNoteMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  2. begin
  3.   ShowMessage(IntToStr(memVwrChartNote.SelStart));
  4.   ShowMessage(IntToStr(memVwrChartNote.SelLength));
  5.   ShowMessage(memVwrChartNote.SelText);
  6. end;
  7.  

ShowMessages display:    0   then  0  then  blank string.

I can't seem to find anything about this on the internet.  Is there some property I have to change to get these to work?

Thanks

 

TinyPortal © 2005-2018