06-22-2012 04:46 AM
I;m not sure what you are asking in the last post. Your code does not explain much. When you ask a question, it is important that you explain what you are trying to do, and why it is failing and what you are actually seeing.
But in answer to your previous post I normally increase 'y' by adding the height of the font I have used to write the previous line.
06-22-2012 05:49 AM
06-22-2012 06:10 AM
I agree with Simon's comment.
In your response, you say "Which is not implementing..".
I suggested in my previous post that "you explain what you are trying to do, and why it is failing and what you are actually seeing.".
"is not implementing" is just a different way of saying "I am unable to display variable height" which is what you said last time.
Can you please expand on this comment as suggested? What is the height of each Field suppsed to be set to? What do you actually see. Have you done anything like set a Background on the Field (See Background and BackgroundFactory classes), so you know what size it is on the Screen. Have you made the Field focusable?
We are trying to help, but you have to make it as easy as posisble for us.
06-22-2012 07:17 AM
Thanks for your suggestions. I want a Custom Field which will be like listfield in which height of each row should be variable. In the previous comment in which i have specified i am trying to vary height. But its not getting displayed.
06-29-2012 07:36 AM
As noted, I think the issue is that you are not helping us.
Start with something very simple (copy a sample), add it to you screen, and make sure it works. Keep adding functionality to this until it breaks. Then you will know what the problem is. Post that code and describe, in detail, what the problem is. What you see, what you expect, screen shots if needed etc. We are not mind readers, we do this in our spare time, so you need to make sure we can help you with the least effort.
06-30-2012 02:54 AM - edited 06-30-2012 03:03 AM
I have posted wireframe above.I want such CustomListControl with rows should be variable in height.
class CustomListField extends Field
private String  strHeader;
private String str;
public MultiElementTextField(String  strHeader,String str, long style) throws IllegalArgumentException
public boolean isFocusable()
protected void layout(int arg0, int arg1)
height = str.length/9;
if(height%9 > 0)
height = height * 20;
int _fieldWidth = Display.getWidth();
protected void paint(Graphics graphics)
graphics.drawText(strHeader, 5, 5);
I will call it in loop until my data is getting parsed and coming from web server. Is it a right way? what should i do?