Recent

Author Topic: [Done] KMemo - Insert Image is in Wrong Place  (Read 606 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
[Done] KMemo - Insert Image is in Wrong Place
« on: July 17, 2019, 11:27:34 pm »
Hi,


Using Kmemo (from latest download)


According to TK's manual. to insert an image in editor do this....

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   OpenPictureDialog1.Options := [ofEnableSizing, ofViewDetail, ofHideReadOnly];
  4.  
  5.   if OpenPictureDialog1.Execute then
  6.   begin
  7.     txtRTF.Blocks.AddImageBlock(OpenPictureDialog1.FileName); //INSERT IMG CODE
  8.  
  9.   end;
  10. end;    
  11.  

It does insert the image but not where the cursor is. It only appends it to the end of the blocks in the editor.
It should be between Sentence 1 & Sentence 2

Not correct way to this.

Any fixes on how to make this work right?
« Last Edit: July 18, 2019, 02:09:07 am by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: [Done] KMemo - Insert Image is in Wrong Place
« Reply #1 on: July 18, 2019, 02:10:28 am »
Switched to RichMemo
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

 

TinyPortal © 2005-2018