Recent

Author Topic: [SOLVED] [TRichMemo] TRichMemoInline and draw selection  (Read 5420 times)

ROCABDEL

  • New Member
  • *
  • Posts: 41
[SOLVED] [TRichMemo] TRichMemoInline and draw selection
« on: June 23, 2015, 10:28:00 pm »
hello everyone  :)
The picture is always draw without selection.
Is there a way to pass the state of selection to TRichMemoInline  :)

thank you friends  ;)
« Last Edit: June 28, 2015, 02:33:25 am by ROCABDEL »
Processor:IntelCore 2 2.19GHz - RAM 2GB
(Lazarus1.0.4 / fpc2.6.0 / qt4.7.3 at4pas2.5 / Xcode4.0)
-Windows 7/8-Intel Mac OS X 10.6.8-Haiku-Openidiana,Solaris11-PC-BSD,GhostBSD-openSUSE,Ubuntu,Fedora,mageia,Sabayon,Chakra..

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #1 on: June 23, 2015, 10:33:05 pm »
ugh...
you should be able to check for SelStart SelLength, when drawing occurs.

Btw, what are you trying to achieve?

ROCABDEL

  • New Member
  • *
  • Posts: 41
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #2 on: June 23, 2015, 11:12:13 pm »
Hi skalogryz
I have a text file with numbers, I replaced with small picture but when I select some of the text that contains pictures the text is selected and pictures are drawn on top of the selection..it's bad to do  :(
sorry for my English..
thank again you sir skalogryz
Processor:IntelCore 2 2.19GHz - RAM 2GB
(Lazarus1.0.4 / fpc2.6.0 / qt4.7.3 at4pas2.5 / Xcode4.0)
-Windows 7/8-Intel Mac OS X 10.6.8-Haiku-Openidiana,Solaris11-PC-BSD,GhostBSD-openSUSE,Ubuntu,Fedora,mageia,Sabayon,Chakra..

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #3 on: June 24, 2015, 03:07:28 am »
Try the following.
open file win32richmemo.pas
go to line 1123.

There's code
Code: [Select]
    Obj.dwFlags := REO_OWNERDRAWSELECT;
replace it with
Code: [Select]
    Obj.dwFlags := 0;
then recompile the project and see if it makes any difference.

ROCABDEL

  • New Member
  • *
  • Posts: 41
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #4 on: June 24, 2015, 11:14:08 pm »
yes it makes a big difference (done  ;)), the pictures are drawn with the selection even if the color of the selection is different from the color of the selection text clBlue and clSkyBlue.

Does he not there's a way to let the user the choice to display the selection in the image or not ?

thank you for your great support skalogryz  :)
Processor:IntelCore 2 2.19GHz - RAM 2GB
(Lazarus1.0.4 / fpc2.6.0 / qt4.7.3 at4pas2.5 / Xcode4.0)
-Windows 7/8-Intel Mac OS X 10.6.8-Haiku-Openidiana,Solaris11-PC-BSD,GhostBSD-openSUSE,Ubuntu,Fedora,mageia,Sabayon,Chakra..

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #5 on: June 25, 2015, 09:54:19 pm »
Does he not there's a way to let the user the choice to display the selection in the image or not ?
There's a way. At least for Windows. The question is, if there's a way for other platforms (gtk and/or OSX).
If the answer is positive (for at least two other platforms) then the current-state of the inline object (such as: selection) could be added to API.

ROCABDEL

  • New Member
  • *
  • Posts: 41
Re: [TRichMemo] TRichMemoInline and draw selection
« Reply #6 on: June 28, 2015, 02:32:17 am »
Ok thank you  :) i understand and i await your good news  :D good luck Sir skalogryz
I'll put resolved  :)
Processor:IntelCore 2 2.19GHz - RAM 2GB
(Lazarus1.0.4 / fpc2.6.0 / qt4.7.3 at4pas2.5 / Xcode4.0)
-Windows 7/8-Intel Mac OS X 10.6.8-Haiku-Openidiana,Solaris11-PC-BSD,GhostBSD-openSUSE,Ubuntu,Fedora,mageia,Sabayon,Chakra..

 

TinyPortal © 2005-2018