mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:05:07 +00:00
LibGUI: Register TextEditor "mode" property
This makes it possible to construct a read-only (or display-only) TextEditor in GML: @GUI::TextEditor { mode: "ReadOnly" text: "Well hello friends! :^)" }
This commit is contained in:
parent
1e70986d19
commit
750a608441
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ TextEditor::TextEditor(Type type)
|
|||
: m_type(type)
|
||||
{
|
||||
REGISTER_STRING_PROPERTY("text", text, set_text);
|
||||
REGISTER_ENUM_PROPERTY("mode", mode, set_mode, Mode,
|
||||
{ Editable, "Editable" },
|
||||
{ ReadOnly, "ReadOnly" },
|
||||
{ DisplayOnly, "DisplayOnly" });
|
||||
|
||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||
set_accepts_emoji_input(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue