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
Developer
brsengar
Posts: 70
Registered: ‎04-20-2012
My Device: BB 9105
My Carrier: Vodafone

Creating ListField at a specific location on BB 6

Hi,

 

I am creating a UI which has header which doesn't change, a status bar (also doesn't change). I need to create a list view kind of control with some rows and columns.

 

I have created using ListField but it covers whole screen. How can I create it with fixed header bar and status bar?

 

I am attaching an image what I am looking for.

 

 

Thanks in advance

Brsengar

Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Creating ListField at a specific location on BB 6

you won't be able to do that with the listfield alone, but you can add other fields.
for a simple idea you could use the setTitle and setStatus methods of MainScreen, but if you want to customize it further you need a more complex layout.
Give it a try.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Creating ListField at a specific location on BB 6

Also if you have relatively few rows to display, you could use TableLayoutManager (search the forum for references and the code).  In my opinion it is easier to use than listField, but does not perform as well with a large number of rows.

Please use plain text.
Developer
brsengar
Posts: 70
Registered: ‎04-20-2012
My Device: BB 9105
My Carrier: Vodafone

Re: Creating ListField at a specific location on BB 6

Thanks Simon for reply.

I will give it a try with setTitle and setStatus. Actually I have a title bar and a status bar for my main application which I want to keep and display listview in rest of the screen. 

 

I tried adding background image to the list but it hides the listview. Any idea why?

 

Regards,

Brsengar

Please use plain text.
Developer
brsengar
Posts: 70
Registered: ‎04-20-2012
My Device: BB 9105
My Carrier: Vodafone

Re: Creating ListField at a specific location on BB 6

Thanks peter... Can I select a row in TableLayoutManger? I tried but it seems individual cells.

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Creating ListField at a specific location on BB 6

With TableLayoutManager, the focus is on a cell, so perhaps ListField is the way to go. 

Please use plain text.