1 Star 0 Fork 344

seasky100 / awtk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
group_box_t.md 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
xianjimli 提交于 2019-12-14 13:25 . update docs

group_box_t

概述

image

分组控件。

单选按钮在同一个父控件中是互斥的,所以通常将相关的单选按钮放在一个group_box中。

它本身不提供布局功能,仅提供具有语义的标签,让xml更具有可读性。 子控件的布局可用layout_children属性指定。 请参考布局参数

group_box_t是widget_t的子类控件,widget_t的函数均适用于group_box_t控件。

在xml中使用"group_box"标签创建group_box。如:

<group_box x="20" y="230" w="50%" h="90" children_layout="default(r=3,c=1,ym=2,s=10)" >
<radio_button name="r1" text="Book"/>
<radio_button name="r2" text="Food"/>
<radio_button name="r3" text="Pencil" value="true"/>
</group_box>

可用通过style来设置控件的显示风格,如背景颜色等。如:

<style name="default" border_color="#a0a0a0">
<normal     bg_color="#f0f0f0" />
</style>

函数

函数名称 说明
group_box_cast 转换为group_box对象(供脚本语言使用)。
group_box_create 创建group_box对象

group_box_cast 函数


  • 函数功能:

转换为group_box对象(供脚本语言使用)。

  • 函数原型:
widget_t* group_box_cast (widget_t* widget);
  • 参数说明:
参数 类型 说明
返回值 widget_t* group_box对象。
widget widget_t* group_box对象。

group_box_create 函数


  • 函数功能:

创建group_box对象

  • 函数原型:
widget_t* group_box_create (widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h);
  • 参数说明:
参数 类型 说明
返回值 widget_t* 对象。
parent widget_t* 父控件
x xy_t x坐标
y xy_t y坐标
w wh_t 宽度
h wh_t 高度
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/seasky100/awtk.git
git@gitee.com:seasky100/awtk.git
seasky100
awtk
awtk
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891