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

Import Statement: import Felgo 3.0
Since: Felgo 2.7.0



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"
           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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support