read_string — 在文本窗口中读取字符串。
This operator does not work in an HDevelop graphics window opened with
dev_open_window.
read_string( : : WindowHandle, InString, Length : OutString)
read_string reads a string with a predetermined maximum length
(Length) from the keyboard in the input window (= output
window). The string is read from the current position of the text cursor
using the current font. The maximum length has to be small enough to keep the
string within the right window boundary. A default string which can be
edited or simply accepted by the user may be provided. After text input
the text cursor is positioned at the end of the edited string.
Commands for editing:
finish input
delete the character on the left side of the cursor and move the cursor to this position.
The length is stated as number of characters. If 'filename_encoding'
is set to 'locale' with set_system, the length is stated in
number of bytes.
WindowHandle (输入控制) window → (handle)
窗口句柄。
InString (输入控制) string → (string)
Default string (visible before input).
默认值: ''
Length (输入控制) integer → (integer)
Maximum number of characters.
默认值: 32
限制:
Length > 0 && Length <= 1024
OutString (输出控制) string → (string)
Read string.
read_string returns 2 (
H_MSG_TRUE)
if the text window is valid and a
string of maximal length fits within the right window boundary.否则将抛出异常。
read_char,
fread_string,
fread_char
set_tposition,
new_line,
open_window,
set_font,
set_color
基础