29 if (accepts_tab_ != value) {
58 std::vector<xtd::ustring>
lines()
const {
79 if (multiline_ != value) {
96 if (read_only_ != value) {
113 select(selection_start_, value);
126 select(value, selection_length_);
137 if (word_wrap_ != value) {
163 virtual void select(
size_t start,
size_t length) {
164 if (selection_start_ != start || length != selection_length_) {
167 selection_start_ = start;
168 selection_length_ = length;
223 bool accepts_tab_ =
false;
225 bool multiline_ =
false;
226 bool read_only_ =
false;
227 bool word_wrap_ =
true;
228 mutable size_t selection_start_ = 0;
229 mutable size_t selection_length_ = 0;
Contains xtd::argument_out_of_range_exception exception.
Contains xtd::bit_converter class.
The exception that is thrown when one of the arguments provided to a method is out of range.
Definition: argument_out_of_range_exception.h:18
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
static const event_args empty
Provides a value to use with events that do not have event data.
Definition: event_args.h:31
Represents an event.
Definition: event.h:21
Implements the basic functionality required by text controls.
Definition: text_box_base.h:20
void select_all()
Selects all text in the text box.
Definition: text_box_base.h:174
virtual void on_read_only_changed(const event_args &e)
Raises the text_box_base::read_only_changed event.
Definition: text_box_base.h:218
virtual bool multiline() const
Gets a value indicating whether this is a multiline text box control.
Definition: text_box_base.h:73
virtual void on_border_style_changed(const event_args &e)
Raises the text_box_base::border_style_changed event.
Definition: text_box_base.h:206
virtual void on_accepts_tab_changed(const event_args &e)
Raises the text_box_base::accepts_tab_changed event.
Definition: text_box_base.h:200
virtual text_box_base & selection_length(size_t value)
Sets the number of characters selected in the text box.
Definition: text_box_base.h:112
virtual text_box_base & selection_start(size_t value)
Gets o the starting point of text selected in the text box.
Definition: text_box_base.h:125
virtual void on_multiline_changed(const event_args &e)
Raises the text_box_base::text_box_base::multiline_changed event.
Definition: text_box_base.h:212
virtual void select(size_t start, size_t length)
Selects a range of text in the text box.
Definition: text_box_base.h:163
text_box_base & lines(const std::vector< xtd::ustring > &lines)
Sets the lines of text in a text box control.
Definition: text_box_base.h:65
text_box_base()=default
initializes a new instance of the text_box_base class.
virtual text_box_base & multiline(bool value)
Sets a value indicating whether this is a multiline text box control.
Definition: text_box_base.h:78
virtual text_box_base & read_only(bool value)
Sets a value indicating whether text in the text box is read-only.
Definition: text_box_base.h:95
virtual bool word_wrap() const
Indicates whether a multiline text box control automatically wraps words to the beginning of the next...
Definition: text_box_base.h:132
virtual bool accepts_tab() const
Gets a value indicating whether pressing the TAB key in a multiline text box control types a TAB char...
Definition: text_box_base.h:24
void clear()
Clears all text from the text box control.
Definition: text_box_base.h:155
virtual size_t selection_start() const
Gets o the starting point of text selected in the text box.
Definition: text_box_base.h:120
virtual text_box_base & accepts_tab(bool value)
Sets a value indicating whether pressing the TAB key in a multiline text box control types a TAB char...
Definition: text_box_base.h:28
std::vector< xtd::ustring > lines() const
Gets the lines of text in a text box control.
Definition: text_box_base.h:58
virtual size_t selection_length() const
Gets the number of characters selected in the text box.
Definition: text_box_base.h:107
virtual text_box_base & border_style(forms::border_style border_style)
Sets the border type of the text box control.
Definition: text_box_base.h:43
virtual void append_text(const xtd::ustring &value)
Appends text to the current text of a text box.
Definition: text_box_base.h:146
virtual bool read_only() const
Gets a value indicating whether text in the text box is read-only.
Definition: text_box_base.h:90
virtual forms::border_style border_style() const
Gets the border type of the text box control.
Definition: text_box_base.h:39
forms::cursor default_cursor() const override
Gets the default cursor for the control.
Definition: text_box_base.h:53
virtual text_box_base & word_wrap(bool value)
Indicates whether a multiline text box control automatically wraps words to the beginning of the next...
Definition: text_box_base.h:136
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
std::vector< ustring > split(const std::vector< value_type > &separators, size_t count, string_split_options options) const noexcept
Splits this string into a maximum number of substrings based on the characters in an array.
static ustring join(const ustring separator, const collection_t &values) noexcept
Concatenates a specified separator string between each element of a specified object array,...
Definition: ustring.h:842
Contains xtd::forms::control control.
event< text_box_base, event_handler > border_style_changed
Occurs when the value of the accepts_tab border_style has changed.
Definition: text_box_base.h:184
event< text_box_base, event_handler > multiline_changed
Occurs when the value of the accepts_tab border_style has changed.
Definition: text_box_base.h:188
event< text_box_base, event_handler > read_only_changed
Occurs when the value of the read_only property has changed.
Definition: text_box_base.h:192
event< text_box_base, event_handler > accepts_tab_changed
Occurs when the value of the accepts_tab property has changed.
Definition: text_box_base.h:180
#define current_stack_frame_
Provides information about the current stack frame.
Definition: stack_frame.h:201
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17