Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Display AutoTextEditField Horizontally

 
Nans Java
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im a student and im trying to display the AutoTextEditField in the row wise, i have used to the follwing code . but i could not get the proper result.Please let me know how to work out.

public MyTextInput2()
{
inputScreen = new MainScreen(); //create screen instance
sep=new SeparatorField();

inputScreen.setTitle("Timesheet Pro");

//New add
HorizontalFieldManager backGround = new HorizontalFieldManager();

HorizontalFieldManager textboxes = new HorizontalFieldManager();

String[] names = {"Activity ","Start ","End ","Hours ","Memo "};
int ages[] = {36, 34, 10, 8, 3};

LabelField displayNames[] = new LabelField[5];

AutoTextEditField inputField[] = new AutoTextEditField[5];

StringBuffer sBuffer = new StringBuffer();

int width=Graphics.getScreenWidth()/5;

int spaceSize=Font.getDefault();

for(int j=0;j<width;j+=spaceSize)
{
sBuffer.append(' ');
}



for(int i=0;i<5;i++)
{
displayNames[i]=new LabelField(names[i]);

backGround.add(displayNames[i]);
}

for(int j=0;j<5;j++)
{
inputField[j]=new AutoTextEditField("Text"," ");

textboxes.add(inputField[j]);
}


//LabelField leftTitle = new LabelField("Name");




inputScreen.add(backGround);
inputScreen.add(sep);
inputScreen.add(textboxes);


pushScreen(inputScreen); //post the screen itself
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic