2011-07-05 2 views
1

Dans mon application, je dois afficher la liste des éléments avec le prix EditField. Comment puis-je ajouter EditField dans la liste?Afficher un champ EditField dans un champ ListField de BlackBerry

Pour ListField, je suis en utilisant ce code

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

    this.listField=listField; 
    String text=(String) get(listField, index); 
    if(holder[index]==null) 
    { 
     holder[index]=placeholder; 
    } 
    graphics.setColor(rgb); 
    graphics.setFont(Utility.getBigFont(DConfig.getFSize()+4)); 
    graphics.drawBitmap(3,y+7,placeholder.getWidth(), placeholder.getHeight(),holder[index], 0, 0); 
    graphics.drawText(text,100,y+15); 
    graphics.drawText("Price:",100,y+30); 
    graphics.drawText(CartScreen.price[index],100,y+45); 
    graphics.drawLine(0, y+74, DConfig.disWidth, y+74); 
} 

Comment puis-je ajouter le champ d'édition à la liste des lignes

Répondre

2

Vous ne serez pas en mesure de placer effectivement le EditField là-dedans. Votre meilleur pari est d'utiliser juste un VerticalFieldManager et empiler LabelFields/EditFields là. Il défilera toujours, ne sera pas ListField.

Questions connexes