Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Events

Content

Usage

Examples

Code Block

actions
{
    action(id: 'nextAction',
            name: 'Next >>',
            closure: { cards.layout.show(cards, 'Options') })
            
    action(id: 'prevAction',
            name: '<< Prev',
            closure: { cards.layout.show(cards, 'Main') })
}

application(title:'Test',
  pack:true,
  locationByPlatform:true,
  iconImage: imageIcon('/griffon-icon-48x48.png').image,
  iconImages: [imageIcon('/griffon-icon-48x48.png').image,
               imageIcon('/griffon-icon-32x32.png').image,
               imageIcon('/griffon-icon-16x16.png').image]
) 
{
    panel(id: 'cards')
    {
        cardLayout()
    
        panel(constraints: 'Main')
        {
            label('Main Page')
            
            button(action: nextAction)
        }
        
        panel(constraints: 'Options')
        {
            label('Options Page')
            
            button(action: prevAction)        
        }  
    }
    
    cards.layout.show(cards, 'Main')
}