Page 1 of 1

RichEdit: How to not show URL?

PostPosted: Tue Feb 13, 2018 3:19 am
by hua
Hi guys,
In wordpad, a text formatted as hyperlink appears nicely like this

Image

but in FWH the full url is shown too in addition to the text like this
Image

How to get it to appear as in wordpad?

TIA

Re: RichEdit: How to not show URL?

PostPosted: Wed Feb 14, 2018 7:40 am
by Antonio Linares

Re: RichEdit: How to not show URL?

PostPosted: Wed Feb 14, 2018 8:03 am
by Silvio.Falconi
run correctly on richedit and richedit5
I have a fivepad where I insert correctly the url

Re: RichEdit: How to not show URL?

PostPosted: Wed Feb 14, 2018 8:24 am
by Antonio Linares
Silvio,

Could you post an example ?

thanks

Re: RichEdit: How to not show URL?

PostPosted: Wed Feb 14, 2018 8:40 am
by Silvio.Falconi
do U have set GetAutoURLDetect()

Re: RichEdit: How to not show URL?

PostPosted: Wed Feb 14, 2018 12:09 pm
by Silvio.Falconi
you can use the link sample "https: // http://www.fivetechsoft.com" and rtf class recognizes it as a link .

creating what the friend wants is not possible in rtf classes unless you use the class in Harbor that converts the text in html ( section contribut)

I saw there is the possibilty to use html commands as in trichedit with MsftEdit.dll but Cristobal not make the function yet

you can set a line or word with the method

SetAttribute( lBold, lItalic, lUnderline, lStrikeOut, lOnOff, lLink, nYOffSet, lSuper, lSub, lProtect, nTypeUnder ) CLASS TRichEdit5

or exactply with setlink( lonoff) method but it not run ok

see this sample

Code: Select all  Expand view
Function MnuTypesUnder( lBtt )

   local oMnu

   DEFAULT lBtt   := .F.

      MENU oMnu POPUP 2015
      MENUITEM "make Link"  ACTION oRTF:SetLink( .t. )

      MENUITEM "UnderLineHeavywave"  ACTION oRTF:SetTypeUnderline( 12 )
      MENUITEM "UnderLineDoublewave" ACTION oRTF:SetTypeUnderline( 11 )
      MENUITEM "UnderLineHairline"   ACTION oRTF:SetTypeUnderline( 10 )
      MENUITEM "UnderLineThick"      ACTION oRTF:SetTypeUnderline(  9 )
      MENUITEM "UnderLineWave"       ACTION oRTF:SetTypeUnderline(  8 )
      MENUITEM "UnderLineDashdotdot" ACTION oRTF:SetTypeUnderline(  7 )
      MENUITEM "UnderLineDashdot"    ACTION oRTF:SetTypeUnderline(  6 )
      MENUITEM "UnderLineDash"       ACTION oRTF:SetTypeUnderline(  5 )
      MENUITEM "UnderLineDotted"     ACTION oRTF:SetTypeUnderline(  4 )
      MENUITEM "UnderLineDouble"     ACTION oRTF:SetTypeUnderline(  3 )
      SEPARATOR
      MENUITEM "UnderLineWord"       ACTION oRTF:SetTypeUnderline(  2 )
   ENDMENU
   //if lBtt
      //ACTIVATE MENU oMnu
   //endif

Return oMnu




probable bug into RESetAttribute5( ::hWnd, nMask, nEffects, lOnOff, nYOffSet, nTypeUnder ) functions

Re: RichEdit: How to not show URL?

PostPosted: Sat Feb 17, 2018 5:03 pm
by cnavarro
hua wrote:Hi guys,
In wordpad, a text formatted as hyperlink appears nicely like this

Image

but in FWH the full url is shown too in addition to the text like this
Image

How to get it to appear as in wordpad?

TIA


Do you have solved this topic?

For put format "link" in TRichEdit5 control, select text and use :SetLink( .T. ) method
If text to format as link does not have a link format like http, https mailto://, etc, ( sample: you want to mark as a link "Hello" ), you have to disable :SetAutoUrlDetect( .F. ) for mark this text

Re: RichEdit: How to not show URL?

PostPosted: Sat Feb 17, 2018 5:15 pm
by cnavarro
Silvio.Falconi wrote:I saw there is the possibilty to use html commands as in trichedit with MsftEdit.dll but Cristobal not make the function yet


Implemented new method SaveAsHtml for next version in class TRichEdit5
Also implemented for next version:
- New: METHOD ImportHtml()
Allow import document html and save as document rtf

Re: RichEdit: How to not show URL?

PostPosted: Sat Feb 17, 2018 5:40 pm
by Silvio.Falconi
Good!!!
Can you show a sample here ?

Re: RichEdit: How to not show URL?

PostPosted: Sat Feb 17, 2018 5:48 pm
by cnavarro
Simple
Code: Select all  Expand view

            MENUITEM "Save As HTML" ACTION oRTF:SaveAsHtml()    // oRTF:SaveAsHtml( "c:\fwh\myfile.html" )
            MENUITEM "Import HTML" ACTION oRTF:ImportHtml()
 

Re: RichEdit: How to not show URL?

PostPosted: Sun Feb 18, 2018 4:49 pm
by Silvio.Falconi
good
it's can be usefull for a sample if we wants write a description of a product and save as Html to use on web or shop on line

Re: RichEdit: How to not show URL?

PostPosted: Mon Feb 26, 2018 2:23 am
by hua
cnavarro wrote:Do you have solved this topic?


Hi Cristobal,
Thank you for the follow up.
No I haven't had the issue resolved because I'm using an older version of FWH which doesn't have TRichEdit5 support.
Some of my modules are still using FWH11.08 while others are using FWH15.01

Re: RichEdit: How to not show URL?

PostPosted: Mon Feb 26, 2018 2:31 am
by cnavarro
Please look this topic and samples ( they can also work with the old RICHEDIT control )

viewtopic.php?f=3&t=35301&start=0#p210158