xtd.forms - Reference Guide  0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
text_box.h
1 #pragma once
2 #include "border_style.h"
3 #include "text_box_base.h"
4 
6 namespace xtd {
8  namespace forms {
9  class text_box : public text_box_base {
10  public:
11  text_box();
12 
13  virtual forms::border_style border_style() const {return this->border_style_;}
15 
16  drawing::color default_back_color() const override {return xtd::forms::theme_colors::current_theme().text_box();}
17 
18  drawing::color default_fore_color() const override {return xtd::forms::theme_colors::current_theme().text_box_text();}
19 
20  drawing::size default_size() const override {return {100, 21};}
21 
22  virtual bool multiline() const {return multiline_;}
23  virtual text_box& multiline(bool value);
24 
25  using text_box_base::text;
26  control& text(const std::string& text) override;
27 
28  virtual bool use_system_password_char() const {return use_system_password_char_;}
29  virtual text_box& use_system_password_char(bool value);
30 
31  void select(size_t start, size_t length) override;
32 
33  protected:
34  forms::create_params create_params() const override;
35 
36  drawing::size measure_control() const override;
37 
39  bool multiline_ = false;
40  bool use_system_password_char_ = false;
41  };
42  }
43 }
forms::create_params create_params() const override
Gets the required creation parameters when the control handle is created.
drawing::color default_back_color() const override
Gets the default background color of the control.
Definition: text_box.h:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: text_box_base.h:8
Definition: text_box.h:9
drawing::size measure_control() const override
Measure this control.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:60
border_style
Specifies the border style for a control.
Definition: border_style.h:10