I know that I get the number of rows using "sci_GetLineCount", but if I set "Auto Wrap", the actual number of rows will be more, but I didn't find a command to get this value.
Who knows which function to get it?
I want to automatically adjust the GUI height based on the height of the text. So my plan is: line height * line number.
However, it would be better if you could get the height of the text directly.
So how do you get the height of all the text?
SciLexer.dll Get line quantity
Re: SciLexer.dll Get line quantity
Try this:
Code: Select all
LineCount := Sci[n].GetLineCount()
Rows := 0
Loop %LineCount% {
Rows += Sci[n].WrapCount(A_Index - 1)
}
MsgBox % "Lines:`t" . LineCount . "`nRows:`t" . Rows . "`nHeight:`t" . (Sci[n].TextHeight(0) * Rows)
Re: SciLexer.dll Get line quantity
Thank you for your help, which solved my problem.
Who is online
Users browsing this forum: Google [Bot], haomingchen1998, Joey5 and 157 guests