Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8470531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:32:43+00:00 2026-06-10T16:32:43+00:00

I am writing a custom software using avalon edit and I am looking for

  • 0

I am writing a custom software using avalon edit and I am looking for a way to make the space (height) between lines bigger. At the moment I am forced to add an empty line every time the user has ended writing a line and wants to write another.

I have started looking into the TextView Class where defaultLineHeight seems to be calculated but the only thing I was able to affect is the height of the visual caret but not the content itself.

At the moment I am looking at making every pair line invisible but I am hoping there is an easier way to achieve the simple operation of adding more space between lines.

Here is the method from class TextView I am inspecting at the moment. Any tips or hints would be welcome.

void CalculateDefaultTextMetrics()
{
    if (defaultTextMetricsValid)
    {
        return;
    }

    defaultTextMetricsValid = true;
    if (formatter != null)
    {
        var textRunProperties = CreateGlobalTextRunProperties();
        using (
            var line = formatter.FormatLine(
                new SimpleTextSource("x", textRunProperties),
                0,
                32000,
                new VisualLineTextParagraphProperties { defaultTextRunProperties = textRunProperties },
                null))
        {
            wideSpaceWidth = Math.Max(1, line.WidthIncludingTrailingWhitespace);
            defaultBaseline = Math.Max(1, line.Baseline);
            defaultLineHeight = Math.Max(1, line.Height);
        }
    }
    else
    {
        wideSpaceWidth = FontSize / 2;
        defaultBaseline = FontSize;
        **defaultLineHeight = FontSize + 3; // bigger value only affects caret height :(**
    }

    // Update heightTree.DefaultLineHeight, if a document is loaded.
    if (heightTree != null)
    {
        heightTree.DefaultLineHeight = defaultLineHeight;
    }
}

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:32:44+00:00Added an answer on June 10, 2026 at 4:32 pm

    The DefaultLineHeight is the height of a line in the default font, which is used as an initial assumption for the each line’s height. (e.g. for calculating the scroll bar position)

    Whenever a line gets actually measured (TextView.BuildVisualLine), the measured height gets stored in the height tree, overwriting the default height. This is because word wrapping (or a line transformer changing the font size) can cause each line to have a different height.

    Inter-line spacing isn’t really supported at the moment. If you want to add that, you can try changing the height calculation of the VisualLine, e.g. by changing VisualLine.SetTextLines().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Spring Framework . While writing custom queries, I am unable check
I'm looking into writing a small custom app for a small business that can
I'm writing custom security attribute and got strange compiler behaviour... When I'm using the
It is strange. I'm writing custom user registration and want to make redirection to
It seems most apps are writing custom logic to sync/replicate cloud data, or using
I am looking for a solution for reading (and possibly writing) custom properties of
I am writing an custom callback function in Fortran for a piece of software
I am using NSPasteboardWriting protocol for writing custom object on NSPasteboard. How to create
I am working through the tutorials on writing custom spring namespace handlers found here:
I'm writing a custom overlay for a Google Map. I have a serious of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.