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
sickned
Posts: 88
Registered: ‎09-25-2008
My Device: Not Specified

Increase drawing region on ListField

Hi,

 

Im drawing a tooltip for all rows in a ListField.

 

The problem is when the list has only a few rows, then the tooltip gets cutted by the drawing region (extent or clipping rect??)

 

I've tried doing setExtent(getExtent().x, Display.getHeight()) and it doesnt work.

 

Any help, please?

 

Regards.

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Increase drawing region on ListField

You'll probably need to draw these tool tips from the paint() routine of the screen, rather the field. In this way, you can use the graphics context of the screen.

 

For example, override the paint() method of the screen:

 

protected void paint(Graphics g)

{

    super.paint();

    fld.drawToolTips(g);

}

 

   

 

 

 

Developer
sickned
Posts: 88
Registered: ‎09-25-2008
My Device: Not Specified

Re: Increase drawing region on ListField

Thats what Im doing, but when the list has only a few elements, the tooltip gets cutted by the draw region. How can increase it?

 

Thanks!

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Increase drawing region on ListField

If you are drawing the tips using the graphics context of the screen (as suggested above), then your tips could not be clipped by anything other than the physical bounds of the screen. This is the largest drawing context available.

 

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Increase drawing region on ListField

touché :smileyhappy:

----------------------------------------------------------
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
Developer
sickned
Posts: 88
Registered: ‎09-25-2008
My Device: Not Specified

Re: Increase drawing region on ListField

Sorry, I understood that you refers ListField paint(), that is what Im doing.

 

What could be the solution in this case?

 

Thanks.