XUL Tutorial Study Notes - Simple Element

Creating a Window

1. window tag: Each user interface window is described in a separate file, like html tag in html file.

2. The orient attribute specifies the arrangement of the items in the window, the default value is vertical.

Adding Buttons

<button
id="identifier"
class="dialog"
label="OK"
image="images/image.jpg"
disabled="true"
accesskey="t"/>

Adding Labels and Images

1. Tag for image: <image src = "some URL">.

Input Controls

1. <textbox>: type(password/number)

2. <checkbox> uses checked attribute, and <radio> uses selected attribute.

3. <radiogroup> used to group radio buttons together.

Numeric Controls

1. <scale>: orient attribute and dir attribute.

2. <datepicker> type attribute(grid/popup)

3. <timepicker>

List Controls

1. <listbox> <listitem>

2. <listcols> <listcol> <listcell>

3. <listhead> <listheader>

4. <menulist> <menupopup> <menuitem>

Progress Meters

<progressmeter >mode attribute

Adding HTML Elements

1. You should avoid using HTML elements in XUL files if you can.

Using Spacers

1. <spacer>flexattribute.

More Button Features

1. Add button image: imageattribute, CSS list-style-image style.

2. The dir attribute(default normal or reverse) controls the direction of text and the image, theorient attribute(default horizontal or vertical) used to place the image above or below the text.

3. Menu popup inside the button: type attribute(menu or menu-button)

2. Specifying a flex value of 0 has the same effect as leaving the flex attribute out entirely. It means that the element is not flexible at all. You may also sometimes see a flex value specified as a percentage. This has no special meaning and is treated as if the percent sign was not there.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值