Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
gnatok
Posts: 34
Registered: ‎05-20-2012
My Carrier: Vodafone

Searching for Custom Controller - Calendar

Hi all.

Calendar - is main part of my app. In web version of app  for calendar i use tables.

 

Looking for ideas how to make a calendar in Cascades.

 

Thanks 

Please use plain text.
Developer
laurentC
Posts: 223
Registered: ‎02-05-2010
My Carrier: Bouygues Telecom

Re: Searching for Custom Controller - Calendar

Maybe a main topToBottom StackLayout with 4,5 LeftToRight StackLayout inside ?

Twitter : @LaurentKP
My apps
Please use plain text.
BlackBerry Development Advisor
selom
Posts: 60
Registered: ‎05-10-2012
My Carrier: none

Re: Searching for Custom Controller - Calendar

Hello,

 

I am not aware of any custom controls available for the Cascades NDK at this time. As Laurent already mentioned, the standard way of creating one would be to use a grid, which can be accomplished by creating a container with stack layout with a flow direction of TopToButtom, and then in each row, creating another container with a stack layout of buttons with a flow direction of LeftToRight.

 

example:

 

import bb.cascades 1.0

Page {
    content: Container {
        layout : StackLayout {
            layoutDirection : LayoutDirection.TopToBottom
        }
        Container {
            layout : StackLayout {
                layoutDirection : LayoutDirection.LeftToRight
            }
            Button { text : "1" }
            Button { text : "2" }
            Button { text : "3" }
        }
        Container {
            layout : StackLayout {
                layoutDirection : LayoutDirection.LeftToRight
            }
            Button { text : "4" }
            Button { text : "5" }
            Button { text : "6" }
        }
    }
}

 

Additional tweaking required to make it prettier :smileyhappy: Good luck!

 

Cheers

Selom

Please use plain text.