Table of Contents

Method GetMaxColsForWidth

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

GetMaxColsForWidth(List<string>, int, int)

Gets the index position from the list based on the width.

public static int GetMaxColsForWidth(List<string> lines, int width, int tabWidth = 0)

Parameters

lines List<string>

The lines.

width int

The width.

tabWidth int

The number of columns used for a tab.

Returns

int

The index of the list that fit the width.

Remarks

This API will return incorrect results if the text includes glyphs whose width is dependent on surrounding glyphs (e.g. Arabic).