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
New Contributor
Posts: 9
Registered: ‎06-29-2010
My Device: 8900
My Carrier: Vodafone

Touch event problem

Hello dear friends

 

 I am doing touch events program but there are one problem that  i take two Horizontal Manager so focus in the first manger they not set the second manger thus what to do????????

 

pls help me..

 

 

if(event==TouchEvent.CLICK ){
int fieldCounter = mainmanager.getFieldCount();
for (int i=fieldCounter -1; i >=0; --i) {
Field f = mainmanager.getField(i);
if (f instanceof HeaderField) {
f.setFocus();
break;
} else 
{
Dialog.alert("HEkkk"+f);
FontControlManager.setFocus();
}
}
return true;
}

 

if(event==TouchEvent.CLICK )

{

int fieldCounter = mainmanager.getFieldCount();

 for (int i=fieldCounter -1; i >=0; --i)

{

Field f = mainmanager.getField(i);

  if (f instanceof HeaderField)

{

 f.setFocus();

break;

 }

else 

{

 Dialog.alert("HEkkk"+f);

 FontControlManager.setFocus();

 }

 }

 return true;

}

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Touch event problem

Could you please explain your problem again in a little more detail. 

New Contributor
Posts: 9
Registered: ‎06-29-2010
My Device: 8900
My Carrier: Vodafone

Re: Touch event problem

There are some my code given 

 

In there one vertical manager and then adding two horizontal manager .In first horizontal manger put back button and another horizontal manager put one custom  volume control thus at that time i clike the second horizontal manger that time the transfer back page and focus not move the second horizontal manger they only focus the back button so how to transfer focus the second horizontal manager .

 

I given code the 1 ques.

 

So help me...