Jump to content

Search the Community

Showing results for tags 'richedit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 3 results

  1. In my Delphi application (Embarcadero RAD Studio 10.0 Seattle), I am trying to convert an rvf file to HTML using TJvRichEdit and TJvRichEditToHtml components. The issue I am facing is that the HTML file appears in ANSI encoding format. I need to get it in UTF-8 format to display the proper content in html file. I have tried the following ways to achieve the same: Tried to use the available properties of TJvRichEdit for converting ANSI to UTF-8. Tried to add the rtf file to TStrings and then used UTF8Encode to convert it. Tried to add data into TMemoryStream and then tried adding it to TJvRichEdit. Used TStreamReader to get the encoding format of the source file and then used TStreamWriter to convert it into UTF-8 encoding. All the above ways convert the encoding format but the content remains in ANSI format. I have also tried using TRichEdit, TcxRichEdit and TdxRichEditControl to find out if we can load data into html file. But the data gets loaded in ANSI encoding format itself. Any help would be appreciated.
  2. Hi. I used the code below to print Richedit in pre-XE Delphi for many years. Now it get stuck in the repeat loop: In my test, the first nextchar gives 571, in the next and all subsequent cals gives 570. Gence the loop hangs. Does Anybody have any ideas as to what has changed or what am I doing wrong? Printer.BeginDoc; try With Printer.Canvas Do Begin printresX := GetDeviceCaps( handle, LOGPIXELSX ); printresY := GetDeviceCaps( handle, LOGPIXELSY ); printarea:= Rect( printresX div 2, // 0.5 inch left margin printresY div 2, // 0.5 inch top margin Printer.PageWidth - (printresX div printresX), // 0.5 inch right margin Printer.PageHeight - (printresY-2) // 1 inch bottom ); richedit_outputarea := Rect( (printarea.left) * 1440 div printresX, ((printarea.top) * 1440 div printresY), (printarea.right) * 1440 div printresX, (printarea.bottom)* 1440 div printresY ); fmtRange.hDC := Handle; // printer handle fmtRange.hdcTarget := Handle; // ditto fmtRange.rc := richedit_outputarea; fmtRange.rcPage := Rect( 0, 0, Printer.PageWidth * 1440 div printresX, Printer.PageHeight * 1440 div printresY ); fmtRange.chrg.cpMin := 0; fmtRange.chrg.cpMax := richedit1a.GetTextLen; // remove characters that need not be printed from end of selection. // failing to do so screws up the repeat loop below. S:= richedit1a.Text; While (fmtRange.chrg.cpMax > 0) and (S[fmtRange.chrg.cpMax] <= ' ') Do Dec(fmtRange.chrg.cpMax); pageof:=0; //total number of pages Repeat // only count pages here. // Render the text nextChar := richedit1a.Perform( EM_FORMATRANGE, 0, Longint(@fmtRange)); fmtRange.rc := richedit_outputarea; Inc(pageof); If nextchar < fmtRange.chrg.cpMax Then Begin // more text to print fmtRange.chrg.cpMin := nextChar; End; { If } Until nextchar >= fmtRange.chrg.cpMax;
  3. I am trying to get a reusable TFrame working to use in a number of places in our app to let the users edit and format text in a TJvRichEdit. It consists of a TJvRichEdit and a TJvSpeedBar. The JEDI example code works, and I have copied and pasted the relevant form into the test project where I am developing this frame. But there is a problem in the frame: the colour buttons (Color and Background), which drop down lists of colours in the sample code and change the colour of the text, don't display correctly in the frame. They appear full length but empty, although selecting an item does change the colour of the text. In contrast the Underline button has a drop down list that looks and works fine in my code. The code is essntially the same. I'm initializing the menus in the form's OnShow event, whereas the JEDI sample does it in the form's OnCreaate. There's some strange behaviour in Delphi. If I bring up the Speedbar Designer and select the Color buttons, the list that appears in the Events tab is slightly different between the sample form and my frame, even though they should be the same. In the one that works there is a line for DropDownMenu, with the red font for properties that show up on the events tab. That line is absent from the correpsonding place in my frame. That line does show up for the buttons where the DropDownMenu is nil though. Curious. I'm using Delphi 10.1 Berlin and JCL version 3.50. JvRichEditToolBar.7z
×