Forum > Packages and Libraries

THTMLViewer.SelText .SelStart not working


Platform:  Lazarus 2.0.10, FPC 3.2, THTMLViewer

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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TfrmMain.htmVwrChartNoteMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin  ShowMessage(IntToStr(memVwrChartNote.SelStart));  ShowMessage(IntToStr(memVwrChartNote.SelLength));  ShowMessage(memVwrChartNote.SelText);end; 
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?



[0] Message Index

Go to full version