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
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013

Problem in GUI

Hey 

I have created the simple app that includes various label field and when i click on any field ,the field's description appeas and when i click on the label field again the description disappears.

The problem is when i click on any field,its description comes after all the labels.

Like i have 3 labels:

A

B

C

 

when i click on A , its description comes after C and same for B.

I want the description of A will come below A and same for all.

Can anyone help me?

Please use plain text.
Developer
peter_strange
Posts: 19,513
Registered: ‎07-14-2008

Re: Problem in GUI

[ Edited ]

Insert the description before the selected Field.

 

Look at the Field method getFieldIndex() and the Manager method insert.  You will also need to figure out how you are going to use the Manager 'delete' method.  FInally you might find the Field method getManager() useful to see if you have actually added a Field.

 

These methods should enable you to resolve your problem.  Please review the JavaDocs for more. 

Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013

Re: Problem in GUI

Hi  I am doing like this:

 

message = new LabelField("This is inside the help menu...");
m1.add(message);
label = new LabelField("Help",LabelField.FOCUSABLE)
{
protected boolean navigationClick(int status, int time)
{
if(flag)
{

UiAppScreen.this.add(m1);
flag= false;
}
else
{

UiAppScreen.this.delete(m1);
flag= true;

}


return true;
}
};
add(label);

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,513
Registered: ‎07-14-2008

Re: Problem in GUI

[ Edited ]

My answer said

 

"insert the description before the selected Field.

 

Look at the Field method getFieldIndex() and the Manager method insert.  You will also need to figure out how you are going to use the Manager 'delete' method.  FInally you might find the Field method getManager() useful to see if you have actually added a Field."

 

So

 

a) Are you inserting the descriptions before the Labels?

b) Have you looked at the Field method getFieldIndex()?

c) Have you looked at the Manager method insert()?

d) Have you looked at the Field method getManager()?

 

That is what I suggested you do, any reason why you have not done it?

 

As previously stated:

"These methods should enable you to resolve your problem.  Please review the JavaDocs for more. "

Please use plain text.