1 Star 0 Fork 344

seasky100 / awtk

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

tab_button_group_t

概述

image

标签按钮分组控件。

一个简单的容器,主要用于对标签按钮进行布局和管理。

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

在xml中使用"tab_button_group"标签创建标签按钮分组控件。如:

<tab_button_group x="c" y="bottom:10" w="90%" h="30" compact="true" >
<tab_button text="General"/>
<tab_button text="Network" value="true" />
<tab_button text="Security"/>
</tab_button_group>

更多用法请参考: tab control

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

<tab_button_group>
<style name="default">
<normal/>
</style>
</tab_button_group>

函数

函数名称 说明
tab_button_group_cast 转换tab_button_group对象(供脚本语言使用)。
tab_button_group_create 创建tab_button_group对象
tab_button_group_set_compact 设置compact。
tab_button_group_set_scrollable 设置scrollable。

属性

属性名称 类型 说明
compact bool_t 紧凑型排版子控件(缺省FALSE)。
scrollable bool_t 是否支持滚动(缺省FALSE)。

tab_button_group_cast 函数


  • 函数功能:

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

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

tab_button_group_create 函数


  • 函数功能:

创建tab_button_group对象

  • 函数原型:
widget_t* tab_button_group_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 高度

tab_button_group_set_compact 函数


  • 函数功能:

设置compact。

  • 函数原型:
ret_t tab_button_group_set_compact (widget_t* widget, bool_t compact);
  • 参数说明:
参数 类型 说明
返回值 ret_t 返回RET_OK表示成功,否则表示失败。
widget widget_t* 控件对象。
compact bool_t 是否使用紧凑布局(缺省FALSE)。

tab_button_group_set_scrollable 函数


  • 函数功能:

设置scrollable。

  • 函数原型:
ret_t tab_button_group_set_scrollable (widget_t* widget, bool_t scrollable);
  • 参数说明:
参数 类型 说明
返回值 ret_t 返回RET_OK表示成功,否则表示失败。
widget widget_t* 控件对象。
scrollable bool_t 是否允许滚动(缺省FALSE)。

compact 属性


紧凑型排版子控件(缺省FALSE)。

  • 类型:bool_t
特性 是否支持
可直接读取
可直接修改
可持久化
可脚本化
可在IDE中设置
可在XML中设置
可通过widget_get_prop读取
可通过widget_set_prop修改

scrollable 属性


是否支持滚动(缺省FALSE)。

紧凑型排版子控件时才支持滚动。

  • 类型:bool_t
特性 是否支持
可直接读取
可直接修改
可持久化
可脚本化
可在IDE中设置
可在XML中设置
可通过widget_get_prop读取
可通过widget_set_prop修改
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/seasky100/awtk.git
git@gitee.com:seasky100/awtk.git
seasky100
awtk
awtk
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891