Method GetMaxColsForWidth | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
GetMaxColsForWidth(List, 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
The lines.
width
int
The width.
tabWidth
int
The number of columns used for a tab.
Returns
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).