开发者

Scroll VerticalFieldManager

开发者 https://www.devze.com 2023-03-25 21:28 出处:网络
i want to scroll开发者_JS百科 screen because button cannot show on screen i use this code : _manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR);

i want to scroll开发者_JS百科 screen because button cannot show on screen

i use this code :

_manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR);

_manager = (VerticalFieldManager)getMainManager(); _manager.setBackground(bg);

but not work


If your intention is to attract the user to the button, then you can just do the following:

button.setFocus();


First of all I am assuming that you have extended MainScreen which have one default VFM added to it. Now you are creating a new VFM,

_manager = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR); 

and then assigning reference of default parent manager of MainScreen to _manager that you just created above,

_manager = (VerticalFieldManager)getMainManager();

There is no need for retrieving parent manager unless you want to set background on it. So assign reference to some other variable instead of using same _manager.

VerticalFieldManager parentVFM = (VerticalFieldManager)getMainManager();

Now coming back to your original question, can you post some code that shows how you are adding buttons to screen? You should add button to manager and add this manager to parent manager of the screen.

_manager.add(button);
parentVFM.add(_manager);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号