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
Trusted Contributor
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
My Carrier: Airtel,Docomo

ListFields setRowHeight(int,int) Method

I am using ListFields SetRowHeight(index,Height) method to set the ListFields rowHeight Dynamically...

But i am facing one problem,

When i am using the Library installed in

C:\Program Files\Research In Motion\BlackBerry JDE 4.6.1\lib\net_rim_api.jar  in Eclipse then its ok but, as i am going to change the Liberary which is installed in Eclipse plugins then its giving error that this method is not supported,only setRowHeight(Height) this method is supported, and i also not found any Documentation for this method.. so is this method is ok? is there any Documentation for this method? and whats the reason that eclipse plugin not shows this method while jde Library support this method...

Lathiya Himanshu
Developer
Posts: 19,628
Registered: ‎07-14-2008
My Device: Not Specified

Re: ListFields setRowHeight(int,int) Method

This method has never been publicly available.  Sorry you are either going to have stick to using JDE where you have found it by accident. Or not use it. 

Trusted Contributor
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
My Carrier: Airtel,Docomo

Re: ListFields setRowHeight(int,int) Method

[ Edited ]

Hi Peter,

Thanks for reply.. but its working fine in device.. and its very usefull for me to dynamically changing the height of the list field,so i used it.

Will it create any problem in future?

Lathiya Himanshu
Developer
Posts: 16,676
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: ListFields setRowHeight(int,int) Method

undocumented methods can be changed at any time without notice so use them at your own risk

----------------------------------------------------------
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
Trusted Contributor
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
My Carrier: Airtel,Docomo

Re: ListFields setRowHeight(int,int) Method

but i think this method is very usefull to dynamically set the rowHeight,i think they have to Document this method. Because we can easily change the rowheight with this method instead of using other methods.

Lathiya Himanshu
Developer
Posts: 16,676
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: ListFields setRowHeight(int,int) Method

we will see if RIM complies to your wishes. feel free to suggest it!

----------------------------------------------------------
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
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: ListFields setRowHeight(int,int) Method

The reason that method it is not documented is, I believe, that it is experimental and may change. (It is apparently new to OS 5.) My guess is that it, or some method like it, will eventually be bestowed with documentation.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Trusted Contributor
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
My Carrier: Airtel,Docomo

Re: ListFields setRowHeight(int,int) Method

Thanks to all for replying..

but now my problem is that if i not use it then how i can set Row Height Dynamically??

 

my code is like this..

 

class MyList extends ListField implements ListFieldCallBack

{

    public void drawListRow(ListField listField, Graphics graphics, int index,int y, int width)
    {

           if(index==0 || index==3 || index==6)

            {

                //setRowHeight(30);

                setRowHeight(index,30);

            }

            else

            {

                //setRowHeight(60);

                setRowHeight(index,60);

            }

    }

}

 

I want above Functionality....

If i use     setRowHeight(index,30); then list is working fine, But if i use    setRowHeight(30); then its not working fine its giving rowHeight randomly...

So please help me in this issue. How can i set Row Height Dynamically??

Thanks,

Lathiya Himanshu
Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: ListFields setRowHeight(int,int) Method

hey good to hear this method works

 

but in my case it works for first row and all other rows remain of same height

 

abrupt behaviour!!!!!!!!!!!

 

 

Trusted Contributor
Posts: 227
Registered: ‎12-16-2009
My Device: 9530,8900,9000
My Carrier: Airtel,Docomo

Re: ListFields setRowHeight(int,int) Method

[ Edited ]

You have to Check Condition for the Index

as I used then it will work Perfectly,its working fine in my Application.

Lathiya Himanshu