RichEdit: How to not show URL?

RichEdit: How to not show URL?

Postby hua » Tue Feb 13, 2018 3:19 am

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
FWH 11.08
xHarbour 1.2.1 (Rev 6406) + BCC 5.82
Harbour 3.1 (Rev 17062) + BCC 5.82
hua
 
Posts: 719
Joined: Fri Oct 28, 2005 2:27 am

Re: RichEdit: How to not show URL?

Postby Antonio Linares » Wed Feb 14, 2018 7:40 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 35350
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RichEdit: How to not show URL?

Postby Silvio.Falconi » Wed Feb 14, 2018 8:03 am

run correctly on richedit and richedit5
I have a fivepad where I insert correctly the url
I use : FiveWin for Harbour v. 17.11 - Harbour 3.2.0dev (r1703231115)(March 2017) - Bcc7 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
 
Posts: 2731
Joined: Thu Oct 18, 2012 7:17 pm
Location: Teramo - Abruzzo - Italy

Re: RichEdit: How to not show URL?

Postby Antonio Linares » Wed Feb 14, 2018 8:24 am

Silvio,

Could you post an example ?

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 35350
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RichEdit: How to not show URL?

Postby Silvio.Falconi » Wed Feb 14, 2018 8:40 am

do U have set GetAutoURLDetect()
I use : FiveWin for Harbour v. 17.11 - Harbour 3.2.0dev (r1703231115)(March 2017) - Bcc7 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
 
Posts: 2731
Joined: Thu Oct 18, 2012 7:17 pm
Location: Teramo - Abruzzo - Italy

Re: RichEdit: How to not show URL?

Postby Silvio.Falconi » Wed Feb 14, 2018 12:09 pm

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
I use : FiveWin for Harbour v. 17.11 - Harbour 3.2.0dev (r1703231115)(March 2017) - Bcc7 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
 
Posts: 2731
Joined: Thu Oct 18, 2012 7:17 pm
Location: Teramo - Abruzzo - Italy

Re: RichEdit: How to not show URL?

Postby cnavarro » Sat Feb 17, 2018 5:03 pm

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
Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2015/17 - FWH 18.01

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3990
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RichEdit: How to not show URL?

Postby cnavarro » Sat Feb 17, 2018 5:15 pm

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
Last edited by cnavarro on Sat Feb 17, 2018 5:40 pm, edited 1 time in total.
Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2015/17 - FWH 18.01

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3990
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RichEdit: How to not show URL?

Postby Silvio.Falconi » Sat Feb 17, 2018 5:40 pm

Good!!!
Can you show a sample here ?
I use : FiveWin for Harbour v. 17.11 - Harbour 3.2.0dev (r1703231115)(March 2017) - Bcc7 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
 
Posts: 2731
Joined: Thu Oct 18, 2012 7:17 pm
Location: Teramo - Abruzzo - Italy

Re: RichEdit: How to not show URL?

Postby cnavarro » Sat Feb 17, 2018 5:48 pm

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()
 
Muchas gracias. Many thanks.
Saludos,Regards

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2015/17 - FWH 18.01

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
cnavarro
 
Posts: 3990
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: RichEdit: How to not show URL?

Postby Silvio.Falconi » Sun Feb 18, 2018 4:49 pm

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
I use : FiveWin for Harbour v. 17.11 - Harbour 3.2.0dev (r1703231115)(March 2017) - Bcc7 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
 
Posts: 2731
Joined: Thu Oct 18, 2012 7:17 pm
Location: Teramo - Abruzzo - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 10 guests