duilib 小知识 OptionBox 及TabBox使用

duilib 快速入门
 

duilib入门基础一 容器之 BOX、VBOX、HBOX布局及其子控件align排列方式

duilib入门基础二 HBOX容器内 子控件margin定位规则

duilib入门基础三 VBOX容器内 子控件margin定位规则

duilib入门基础四 BOX容器内 子控件margin定位规则

duilib入门基础五 简单示例之 文件选择框使用

duilib入门基础 六 见见世面,duilib 基本控件 Button 能实现的界面一览

duilib入门基础 七 见见世面,duilib 基本控件 复选框 单选框

duilib入门基础 八 见见世面,duilib 基本控件 滑动条

duilib入门基础 九 见见世面,duilib 基本控件 组合框

duilib入门基础 十 见见世面,duilib 基本控件 选项框 OptionBox

云信duilib基本控件示例下载


 

此篇是早期文章,关于 OptionBox使用, 详细可以观看 duilib入门基础 十 见见世面,duilib 基本控件 选项框 OptionBox  这一篇介绍

属性介绍

示例:

左侧使用的就是optionBox

同一组中,选中一个optionBox后,则组内其它OptionBox失去焦点

用法

<VBox bkcolor="white" width="100" margin="0,75,0,0">

   <OptionBox group="headPage_opt" height="99"  cursortype="hand"  name="netOptionBox" selected="true">
     <Event type="select" receiver=".\select_tab" applyattribute="selectedid=&quot;0&quot;" />
     <Event type="unselect" receiver=".\select_tab" applyattribute="selectedid=&quot;1&quot;" />
     <Event type="select" receiver="page_tab" applyattribute="selectedid=&quot;0&quot;" />
     <TabBox mouse="false" mousechild="false" name="select_tab">
                        <HBox bkcolor="white">
                             <VBox valign="center" >
                                <Control />
                                <Control  bkimage="net_h.png" width="auto" height="auto" halign="center"  />
                                <Label  margin="0,6,0,0" text="网络" halign="center" normaltextcolor="bk_wnd_darkcolor1" font="1" mouse="false" />
                                 <Control />
                            </VBox>
                        </HBox>
                        <HBox bkcolor="xnw_set_LeftPane">
                            <VBox valign="center">
                                <Control />
                                <Control  bkimage="net_n.png" width="auto" height="auto" halign="center"  />
                                <Label  margin="0,6,0,0" text="网络" halign="center" normaltextcolor="bk_wnd_darkcolor1" font="1" mouse="false" />
                                 <Control />
                            </VBox>
                        </HBox>
     </TabBox>

 另外,选中OPTION时,呈现选中状态, 失去焦点的时候 呈现另一种状态,这里需要使用TabBox控件实现

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

清水迎朝阳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值