1

I have created a class which has 10 customised Buttons which are added to VFM .. But when i go from 1st button to another its disappears and when i go on the last button it reappears

When i am on the 1st button and press two times the Up button from keyboard it disappears and then again reappears when i change to 2nd button ?? What's the problem with it

and vice versa happpened to the last button when i added the button to the HFM

The code which i use is in this link http://pastebin.com/1Y9siJcj

Yatin
  • 2,969
  • 9
  • 34
  • 68
  • Most probably it's the problem with your Customised Button, provide us with the code for your custom button. – Tariq M Nasim Apr 20 '12 at 08:18
  • http://pastebin.com/1Y9siJcj is the code for CustomButton which i use – Yatin Apr 20 '12 at 08:50
  • Your code is working well on my side, I'm using it as, `VerticalFieldManager vfm = new VerticalFieldManager(); for (int i = 0; i < 10; i++) { vfm.add(new CustomButtonField(bmNormal, bmFocused, Field.FOCUSABLE)); } add(vfm);` – Rupak Apr 20 '12 at 09:58
  • @Rupak: i found out that it works fine for 9 buttons But as soon as i add the 10th buttons the buttons began to disappear – Yatin Apr 23 '12 at 05:55
  • I have modified the code a little here, http://pastebin.com/JYrRfbbQ. You can check that. May be implementation of onFocus() or onUnfocus() causing problem. – Rupak Apr 23 '12 at 06:11
  • I have said earlier that your code is working on my side, and you don't post any code about how are you using that button. And now I have added a trimmed version of your CustomButtonField in answer section with an application. Check that. – Rupak Apr 23 '12 at 06:45
  • layout image, http://tinypic.com/view.php?pic=1zcpxxj&s=5, source code http://pastebin.com/Lcf2Aw2k, http://pastebin.com/TEYgAsgv. I have voted for deleting the answer below (posted by me) and checking your layout and code. – Rupak Apr 23 '12 at 08:05
  • 2
    @Yak, I have modified implementation of VerticalFieldManager. Now it only uses 3 fields but you can add more to them. If you check the code you will see how the manager layouts its childs. Code here, http://pastebin.com/9RR4XQnD – Rupak Apr 23 '12 at 08:53

0 Answers0