BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-19-2008, 09:01 AM   #1
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Question Double line list?

Please Login to Remove!

is there a way to make an object list double line?

I want to create a contacts page, where the name and number should be displayed...

If its in a single line field the alignment will not be correct..

if a multiline list is available that can handle it properly..

Thanks...
Offline  
Old 05-19-2008, 09:59 AM   #2
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default

One way to solve this problem is to use your own class that extends ObjectListField
and in the method:
public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width)

You can draw the text in multiline format or anyway you want. You can even add icons to the text etc..

Rab
Offline  
Old 05-20-2008, 01:25 AM   #3
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Default

I want to show the name in the first line and number in the second line..
Like that I have a list of items....


I have a class which extends mainscreen.

I am just using an Objectlistfield to display the data...

In this case how can i Implement double line
Offline  
Old 05-20-2008, 02:41 AM   #4
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

overwrite drawListRow - as rab1 said.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 05-20-2008, 03:57 AM   #5
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Default

I have no idea how to set the graphics field

Please help me in that?
Offline  
Old 05-26-2008, 05:24 AM   #6
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Default

Is there any other fields like double column list or multi line list in RIM?
Offline  
Old 05-26-2008, 06:11 AM   #7
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

use setRowHeight(getRowHeight()*2) to double the row height without digging deep.
use graphics.drawText(String text, int x, int y), use y (provided by drawlistrow) for the first line and y+the old rowheight for the second line.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 05-27-2008, 02:19 AM   #8
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Question

Thanks simon.hain

But still I am not clear about the implementation..

can you please give some more details....

Sorry for disturbing you...:(
Offline  
Old 07-01-2008, 04:47 AM   #9
arunk
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Cool

At last I implemented it..
Its working fine....

Thanks for your help...
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V picture

Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V

$15.94



100A AC Meter Ammeter Volt Energy Voltage Power LCD Display Monitor Panel picture

100A AC Meter Ammeter Volt Energy Voltage Power LCD Display Monitor Panel

$17.09



LED AC Electric Voltage Power Detector Sensor Tester Non-Contact Pen 12-1000V picture

LED AC Electric Voltage Power Detector Sensor Tester Non-Contact Pen 12-1000V

$12.49



12V Digital LED Display Voltmeter Voltage Gauge Panel Meter for Car Motorcycle picture

12V Digital LED Display Voltmeter Voltage Gauge Panel Meter for Car Motorcycle

$6.49



12-1000V Dual Sensitivity Electrical Tester Pen Non-Contact AC Voltage Detector picture

12-1000V Dual Sensitivity Electrical Tester Pen Non-Contact AC Voltage Detector

$13.99



Car Marine Motorcycle 5V-48V  LED Digital Volt meter Voltage Battery Gauge picture

Car Marine Motorcycle 5V-48V LED Digital Volt meter Voltage Battery Gauge

$6.50







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.