Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

19.GUI:文本框

[email protected] edited this page May 4, 2020 · 2 revisions

GUI:文本框

你需要在外部声明一个可访问的String类型变量,用于存放文本框的文本。

Page.ShowEdit

该方法使用基本图形绘制功能,在应用窗口上显示一个文本框。

NOTE:
用户输入完毕时,该函数的返回值为4

参数名 类型 说明
text String 存放文本框内容的变量
shape Integer 控件的形状,0=矩形,1=椭圆形,2=圆角矩形
x Long 控件的x坐标
y Long 控件的y坐标
w Long 控件的宽度
h Long 控件的高度
TextColor Long 控件文本的颜色
Color Long 鼠标不在控件上时控件的背景颜色
HoverColor Long 鼠标悬停在控件上或控件取得焦点时控件的背景颜色
LineColor Long 控件被激活时边框的颜色
[optional] Radius Long 圆角矩形边角的半径,只有对圆角矩形有效。
[optional] ShapeStyle Integer 0=填充,1=只有边框,默认为0
[optional] size Long 控件标题文本的大小
[optional] style FontStyle 控件标题文本的文字样式,FontStyle 枚举见 wiki 2

支持的操作

Ctrl+C

复制文本框内的整个内容

Ctrl+V

粘贴剪贴板中的内容到文本框

Ctrl+X

复制文本框内的整个内容并删除

Back

删除最后的一个字符