new_lineT_new_lineNewLineNewLinenew_line (算子)

名称

new_lineT_new_lineNewLineNewLinenew_line — 将文本光标的位置设置为下一行的开头。

签名

new_line( : : WindowHandle : )

Herror T_new_line(const Htuple WindowHandle)

void NewLine(const HTuple& WindowHandle)

void HWindow::NewLine() const

static void HOperatorSet.NewLine(HTuple windowHandle)

void HWindow.NewLine()

def new_line(window_handle: HHandle) -> None

描述

new_linenew_lineNewLineNewLineNewLinenew_line sets the position of the text cursor to the beginning of the next line. The new position depends on the current font. The left end of the baseline for writing the following text string (not considering descenders) is placed on this position.

If the next line does not fit into the window the content of the window is scrolled by the height of one line in the upper direction. In order to reach the correct new cursor position the font used in the next line must be set before new_linenew_lineNewLineNewLineNewLinenew_line is called. The position is changed by the output or input of text (write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string) or by an explicit change of position by (set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition).

执行信息

参数

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

窗口句柄。

结果

new_linenew_lineNewLineNewLineNewLinenew_line returns 2 ( H_MSG_TRUE) if the window is valid.否则将抛出异常。

可能的前趋

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, set_fontset_fontSetFontSetFontSetFontset_font, write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string

替代

get_tpositionget_tpositionGetTpositionGetTpositionGetTpositionget_tposition, get_string_extentsget_string_extentsGetStringExtentsGetStringExtentsGetStringExtentsget_string_extents, set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition

另见

write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, set_fontset_fontSetFontSetFontSetFontset_font

模块

基础