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.

inside custom component

Java Development

Reply
New Member
Posts: 2
Registered: ‎01-03-2013
My Device: 9800
My Carrier: WaridTel

Collapsible Panel component

Hi,

can any help me finding the CollapsiblePanel component for blackberry. This component is heavily  used in blackberry's own interface. You can check the reference if you navigate option-->sound and ring tones --> sound for selected profile. Under this section you will find CollapsiblePanel component. These might be available in standard UI but I am unable to find it

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Collapsible Panel component

I have not seen any built in component that does that.  You can simulate then same thing by inserting and removing Fields - which is what I suspect this does anyway. 

 

To do this, create a Manager and supply if with a Heading and a number of "collapsible" Fields.  Have the Manager just add the Heading as say a focusable LabelField and listen for navigationClick on that Field.  If it is clicked and the only Field in the Manager is the Heading, then add all the rest.  If it is clicked and there are Fields in the Manager in addition to the Heading, then remove the extra Fields.  This will emulate the functionality that you see,

 

This can be improved by making the header Field a bit sexier with a +/- icon, and also you can make the process more efficient using additional Managers.  But the above process should get you going. 

 

Hope this is clear.

New Member
Posts: 2
Registered: ‎01-03-2013
My Device: 9800
My Carrier: WaridTel

Re: Collapsible Panel component

thanks peter. i guess i have to make this componenet by myself. i will post the code when its ready
Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Collapsible Panel component

Have a look at TreeField, I suspect it will give the result what u require.

 

FYI,

 

http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TreeField.html

 

Regards

Anil

*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue