- LiveCode Mobile Development Cookbook
- Dr Edward Lavieri
- 194字
- 2021-08-05 18:04:00
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:
- Create a new main stack.
- Drag a button to the stack's card.
- Select, with a single click, the button you want to modify.
- Right-click on the button and select Property Inspector.
- Using the property inspector, select, Icons & Border. This will bring up the interface shown in the following screenshot:
- Select the button state you want to modify. An explanation of each state is in the following table:
- 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).
推薦閱讀
- 解析QUIC/HTTP3:未來互聯網的基石
- 物聯網智慧安監技術
- 物聯網信息安全
- 網絡的琴弦:玩轉IP看監控
- PLC、現場總線及工業網絡實用技術速成
- Socket.IO Real-time Web Application Development
- Mastering JavaFX 10
- Yii Application Development Cookbook(Second Edition)
- Learning Swift(Second Edition)
- 語音信號處理及Blackfin DSP實現
- React Cookbook
- 設備監控技術詳解
- 園區網絡架構與技術
- 基于IPv6的家居物聯網開發與應用技術
- Intelligent Mobile Projects with TensorFlow