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/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
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: 42120
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm

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: 42120
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()
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm

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  RUN
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm

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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
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.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm

Re: RichEdit: How to not show URL?

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

Simple
Code: Select all  Expand view  RUN

            MENUITEM "Save As HTML" ACTION oRTF:SaveAsHtml()    // oRTF:SaveAsHtml( "c:\fwh\myfile.html" )
            MENUITEM "Import HTML" ACTION oRTF:ImportHtml()
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm

Re: RichEdit: How to not show URL?

Postby hua » Mon Feb 26, 2018 2:23 am

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
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: RichEdit: How to not show URL?

Postby cnavarro » Mon Feb 26, 2018 2:31 am

Please look this topic and samples ( they can also work with the old RICHEDIT control )

viewtopic.php?f=3&t=35301&start=0#p210158
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 57 guests