05-13-2011 12:40 AM
Hi,
In the attached image checkbox field focus appears for both icon and data but i need focus only on icon ...
is it possible ?? if yes tell me how??
05-13-2011 02:11 AM
Hi,kiran_b
You create on CustomeCheckBox Class and extends those class to HorizontalField and add the BitampField and LabelField.In there BitmapField given Focusable and LabelField given unFocusable so your problem Slove.
Thanks,
--------------------------------------------------
feel free to press the kudos button
on the left side to thank the user that helped you.
please mark posts as solved if you found a solution
05-13-2011 02:14 AM
any sample link
05-13-2011 02:20 AM
public CustomeLikesDeselectedCheckBox(String text,long l) {
super(unfocusedBitmap, l |FOCUSABLE);
this._text=text;
}
protected void paint(Graphics graphics) {
super.paint(graphics);
graphics.setColor(Color.WHITE);
graphics.setFont(Const.likeFont);
graphics.drawText(_text,40,unfocusedBitmap.getHeig ht()/2-(Const.likeFont.getHeight()/2));
}
protected void drawFocus(Graphics graphics, boolean on) {
}
protected void onFocus(int direction) {
setBitmap(selectedfocusedBitmap);
this.invalidate();
}
protected void onUnfocus() {
setBitmap(unfocusedBitmap);
this.invalidate();
}
public void setId(int number) {
this.number = number;
}
public int getId() {
return number;
}
protected boolean keyChar(char character, int status, int time) {
if (character == Keypad.KEY_ENTER) {
fieldChangeNotify(0);
return true;
}
return super.keyChar(character, status, time);
}
protected boolean navigationClick(int status, int time) {
fieldChangeNotify(0);
return true;
}Hi,kiran_b,
Here i perovide some small code so u check those code and then put your program here .
Thanks,
--------------------------------------------------
feel free to press the kudos button
on the left side to thank the user that helped you.
please mark posts as solved if you found a solution