08-28-2008 09:14 AM
On the Blackberry Pearl 8110, this Item does not look like a Gauge and
does not seem to work well (interactive).
red= new Gauge(tbsmNLS.get("label-vib")+" 0\n", true, 10, 0);
sf.setItemStateListener(this);
red.setLayout(Item.LAYOUT_NEWLINE_BEFORE|Item.LAYO
sf.append(red);
[this]
public void itemStateChanged( Item item ){
if (item instanceof Gauge)
item.setLabel(tbsmNLS.get("label-vib")+" "+((Gauge)item).getValue()+"\n");
}
Before I abandon using this control. Is there some magic here, this works fine on WTK
and is a nice control.
08-28-2008 11:12 AM
I guess if you try a bunch of combinations of things you can get it to work.
red= new Gauge(tbsmNLS.get(" ", true, 10, 0);
sf.setItemStateListener(this);
red.setLayout(Item.LAYOUT_NEWLINE_BEFORE|Item.LAYO
sf.append(red);
[this]
public void itemStateChanged( Item item ){
if (item instanceof Gauge){int i=((Gauge)item).getValue();
// item.setLabel(tbsmNLS.get("label-vib")+" "+i+"\n");
if (i!=gsave){
gsave=i;
((Gauge)item).setValue(i);
}
}
}
Its not very pretty though with Bars just one horizontal stick, needless to say
that a single stick is not pretty.