richedit font size

Posted on 2004-10-25
Last Modified: 2013-12-03
I'm trying to vertically scroll a RichEdit one line at a time so I need to know the currently displayed font size. thanks
Question by:sally_m
    LVL 12

    Accepted Solution

     SendMessage(RichEdit1.Handle, WM_VSCROLL, SB_LINEDOWN, 0);

    Author Comment

    ok but this assumes the height of the richedit is a multiple of its displayed font size. if I have a resizable richedit and I scroll down past the last item, when scrolling up using SB_LINEUP, lines are partially displayed at the top. how can I work around this?
    LVL 12

    Expert Comment

    Well, you can also use abs(RichEdit1.Font.Height) and RichEdit1.ScrollBy method

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    931 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now