Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

SwipeButton

A button with a default style to be used together with SwipeOptionsContainer. More...

Import Statement: import Felgo 3.0
Since: Felgo 2.7.0
Inherits:

AppButton

Properties

Detailed Description

The SwipeButton is a variant of the AppButton control intended to be used together with the SwipeOptionsContainer type. It comes with a default look that matches platform-specific styles.

 App {

   ListPage {
     //some JS array as list model
     model: [{text: "Item 1", detailText: "Detail 1"}, {text: "Item 2", detailText: "Detail 2"}]

     // define the SwipeOptionsContainer as delegate
     delegate: SwipeOptionsContainer {
       id: container

       SimpleRow {                         //actual content to be displayed in the list rows
         id: row
       }

       leftOption: SwipeButton {           //left options, displayed when swiped list row to the right
         text: "Option"
         icon: IconType.gear
         height: row.height
         onClicked: {
           row.item.text = "Option clicked"
           row.itemChanged()
           container.hideOptions()         //hide automatically when button clicked
         }
       }

       rightOption: AppActivityIndicator { //right options, displayed when swiped list row to the left
         height: row.height
         width: height
       }
     } // SwipeOptionsContainer
   } // ListPage

 }

Property Documentation

hideOptionsOnClick : bool

If this is set, a click on this button will call hideOptions() of the containing SwipeOptionsContainer.

The default value is true.