官术网_书友最值得收藏!

Including state graphics on buttons

Buttons have six states in LiveCode: enabled, highlighted, disabled, visited, armed, and hover. Each of these states can have an associated icon to help us communicate with our users. In this recipe, you will learn how to include state graphics on your buttons.

How to do it...

To include graphics on buttons, perform these steps:

  1. Create a new main stack.
  2. Drag a button to the stack's card.
  3. Select, with a single click, the button you want to modify.
  4. Right-click on the button and select Property Inspector.
  5. Using the property inspector, select, Icons & Border. This will bring up the interface shown in the following screenshot:
  6. Select the button state you want to modify. An explanation of each state is in the following table:
  7. If you know the object ID number of the graphic you want to use, enter it directly. Otherwise, you can use the browse tool to the right of the text entry field.

How it works...

We can tell LiveCode which images are to be used for each button state by referring to the graphic's object ID. As the button's state changes, so will its graphic (icon).

主站蜘蛛池模板: 东乡县| 塔河县| 枣庄市| 淳化县| 清丰县| 台安县| 夏河县| 墨江| 邹平县| 明溪县| 澎湖县| 海阳市| 河南省| 天全县| 海淀区| 三门县| 灵璧县| 安塞县| 逊克县| 任丘市| 新建县| 鄄城县| 远安县| 象山县| 依安县| 太仆寺旗| 长葛市| 鹤壁市| 逊克县| 鲜城| 定日县| 古蔺县| 获嘉县| 安国市| 汨罗市| 博爱县| 沙田区| 麦盖提县| 克拉玛依市| 天等县| 苏州市|