You are here:
ImageButton Control
The ImageButton element defines a button that has an image as well as a text displayed to the user. A floating info text can be displayed on the button as well.
Required Editions
| Available in: Enterprise, Performance, and Unlimited Editions |
The table lists the ImageSelector attributes.
| Attribute | Description | Data Type | Required |
|---|---|---|---|
| name | Identification of this image button. | String | yes |
| disabled | Specifies whether this control is enabled or not. | Boolean | no |
| foreColor | only available for image buttons under dashboard sections | 6 digit hex value | no |
| backColor | only available for image buttons under dashboard sections. | 6 digit hex value | no |
| width | to modify the width of an image button | decimal | no |
The ImageButton element contains these sub-elements.
- Bindings
- Resource
- Events
Bindings
The Bindings node consists of Binding elements that can be used in the ImageButton element.
| Attribute | Description | Type | Binding Source | Required |
|---|---|---|---|---|
| Text | The text to display in the button. | Label | Any label resource available in the project or an arbitrary string. | no, defaults to no label displayed |
| Image | The image to display in the button. | Image | Any image resource available in the project. | no, defaults to no image displayed. |
| Info | The floating info to display on the button. | Text | Any string | no, defaults to no floating info displayed |
Resource
The ImageButton Resource node consists of resource elements that can be used in the ImageButton control element. The table list the attributes of the ImageButton Items node
| Attribute | Description | Value or Pattern |
|---|---|---|
| target | Describes the actual UI element. | string [title] |
| type | Defines how the resource is shown. | string [Label] |
| Id | The ID is used to map the localized resource and the actual element in the UI. | string |
| defaultLabel | One default value can be set, depending on the type, that is, defaultText, defaultLabel, and defaultImage. | string |
| bindingMode | Only applies if type = Label. Determines whether a long line of text is wrapped (true) or trimmed (false). | string [One Way] |
Events
The ImageButton Events node consists of the event elements that can be used in the ImageButton control element. ButtonPressedEvent is triggered when an offline mobile app user taps a button.
Sample XML Code
<ImageButton name="ImageButton" disabled="false">
<Bindings>
<Resource target="Image" type="Image" id="AccentureIcon24" />
<Resource target="Text" type="Label" id="labelId" defaultLabel="defaultLabel" />
<Binding target="Info" binding="infoBinding" bindingMode="ONE_WAY" />
<Binding type="Visible" target="Visible" binding="bind" />
<Binding type="Editable" target="Editable" call="dddd">
<Parameters>
<sample></sample>
</Parameters>
</Binding>
</Bindings>
<Events>
<ButtonPressedEvent event="ImageButtonPressed" />
</Events>
</ImageButton>Did this article solve your issue?
Let us know so we can improve!

