【问题标题】:Button HorizontalFieldManager, change background image on focus?按钮水平字段管理器,更改焦点上的背景图像?
【发布时间】:2011-04-10 14:36:38
【问题描述】:
我希望水平字段管理器充当按钮,更改焦点上的背景图像:
为 HorizontalFieldManager 设置背景图像,它应该改变 onfocus(select) 并且它应该作为一个按钮来推动其他屏幕...
在那个 HorizontalFieldManager 下我想添加一个图像和标签来显示一些信息......
我希望它与屏幕截图中的完全一样,没有编辑字段..
【问题讨论】:
标签:
blackberry
button
screen
horizontalfieldmanager
【解决方案1】:
onFocus="this.style.width = '260px'; this.style.background='url(Icalorieimage/account/username_text.png)'"
onBlur="this.style.width = '260px'; this.style.background='url(Icalorieimage/account/username_text.png)' "
【解决方案2】:
调用类似:
getMainManager().setBackground(BackgroundFactory.createLinearGradientBackground(Color.WHITE, Color.GRAY, Color.DIMGRAY, Color.DIMGRAY));
更改屏幕背景。
【解决方案3】:
使用 ListField 怎么样,你想要列表中的单个组件还是多个组件?
如果 Single 你可以移动到你选择的地方,或者开发你的自定义列表字段