Herror ::read_string (
    const HTuple &WindowHandle,
    const HTuple &InString,
    const HTuple &Length,
    char *OutString
)
HTuple HWindow::ReadString (
    const HTuple &InString,
    const HTuple &Length
) const

Read a string in a text window.

::read_string reads a string with a predetermined maximum size (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 size 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: RETURN finish input BACKSPACE delete the character on the left side of the cursor and move the cursor to this position.


Attention

The window has to be a text window.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window identifier.

InString (input_control)
string -> HTuple.char *
Default string (visible before input).
Default value: ''

Length (input_control)
integer -> HTuple.long
Maximum number of characters.
Default value: 32
Restriction: Length > 0

OutString (output_control)
string -> char *
Read string.


Result

::read_string returns H_MSG_TRUE if the text window is valid and a string of maximal length fits within the right window boundary. Otherwise an exception handling is raised.


Possible Predecessors

::open_textwindow, ::set_font


Alternatives

::read_char, ::fread_string, ::fread_char


See also

::set_tposition, ::new_line, ::open_textwindow, ::set_font, ::set_color


Module

System



Copyright © 1996-2002 MVTec Software GmbH