FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RichEdit: How to not show URL?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
RichEdit: How to not show URL?
Posted: Tue Feb 13, 2018 03:19 AM
Hi guys,
In wordpad, a text formatted as hyperlink appears nicely like this



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


How to get it to appear as in wordpad?

TIA
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RichEdit: How to not show URL?
Posted: Wed Feb 14, 2018 07:40 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RichEdit: How to not show URL?
Posted: Wed Feb 14, 2018 08: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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RichEdit: How to not show URL?
Posted: Wed Feb 14, 2018 08:24 AM

Silvio,

Could you post an example ?

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RichEdit: How to not show URL?
Posted: Wed Feb 14, 2018 08:40 AM

do U have set GetAutoURLDetect()

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RichEdit: How to not show URL?
Posted: 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 (fw): Select all Collapse
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 March-April 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RichEdit: How to not show URL?
Posted: Sat Feb 17, 2018 05:03 PM
hua wrote:Hi guys,
In wordpad, a text formatted as hyperlink appears nicely like this



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


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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RichEdit: How to not show URL?
Posted: Sat Feb 17, 2018 05: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
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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RichEdit: How to not show URL?
Posted: Sat Feb 17, 2018 05: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 March-April 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RichEdit: How to not show URL?
Posted: Sat Feb 17, 2018 05:48 PM
Simple
Code (fw): Select all Collapse
聽 聽 聽 聽 聽 聽 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RichEdit: How to not show URL?
Posted: Sun Feb 18, 2018 04: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 March-April 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
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: RichEdit: How to not show URL?
Posted: Mon Feb 26, 2018 02: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RichEdit: How to not show URL?
Posted: Mon Feb 26, 2018 02:31 AM

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

viewtopic.php?f=3t=35301start=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

Continue the discussion