BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-24-2009, 02:33 AM   #1 (permalink)
New Member
 
Join Date: Sep 2009
Model: 8330
PIN: N/A
Carrier: No Carrier
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple white field to draw on

Please Login to Remove!

Hi,



i tried to get a listfield with different sized rows, but this was not possible. so my next idea is, to get a white field and use the paint method to draw the listfield myself, thoughit must not be selectable, there should be no problem with this.

The problem i encountered is, that when the field gets longer than the screen, i am unable to scroll down.

Heres the class of my custom field:
Code:
public class MessageList extends Field {
	
	private Vector messages = null;
	
	public MessageList(Vector mes) {
		super(NON_FOCUSABLE);
		this.messages = mes;
	}

	protected void layout(int width, int height) {
		setExtent(width, height);
	}

	protected void paint(Graphics graphics) {
		for(int i = 0; i < 400; i = i+50) {
			graphics.drawText("blabla" + Integer.toString(i), 15, i, 0, this.getWidth());
		}
	}

}
The field gets added on a simple mainscreen with scrolling enabled.

Maybe anybode has an idea how to get the scrolling working or how to develop a white scrollable field to draw on.



Regards,

Daniel
Offline  
Old 09-29-2009, 04:20 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2009
Model: 9000
PIN: N/A
Carrier: T-Mobile
Posts: 67
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why not have a custom field act as a row and populate a verticalfieldmanager with the fields?
Offline  
Old 09-29-2009, 06:59 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2009
Model: 8300
PIN: N/A
Carrier: Vodafone
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you enabled scrolling on ur main manager ??
Offline  
Old 09-29-2009, 07:14 AM   #4 (permalink)
New Member
 
Join Date: Sep 2009
Model: 7100t
PIN: N/A
Carrier: not sure
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

scrolling enabled will sort this
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Johnson controls t600mep-4 t-stat brand new in box
$199.99
Johnson controls t600mep-4 t-stat brand new in box pictureJohnson controls lp-nrm101-000c network room module brand new in box
$89.99
Johnson controls lp-nrm101-000c network room module brand new in box pictureJohnson Controls Metasy AS-VAV110-1 Rev J
$45.0
Johnson Controls Metasy AS-VAV110-1 Rev J pictureJohnson Controls – Wall Mounted Adjustable – Thermostat - Used
$10.0
Johnson Controls – Wall Mounted Adjustable – Thermostat - Used pictureJohnson controls p352pn-4 prop static control 240-600#
$80.0
Johnson controls p352pn-4 prop static control 240-600# picture






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