开发者

FieldChangeListener for an element in GridFieldManager

I am developing an app for BB 9700 with OS 5. Right now in my program I have a GridFieldManager loaded with bunch of elements in type of horizontalFieldManagers. I noticed that after adding those managers to GridFieldManager and calling getFieldAtIndex to my GridFieldManager, it will return me a FIELD. Can I set a FieldChangeListener to this returned field? What I know is I could not do it to HorizontalFieldManager. But can I do it to this returned field?

My intention is to create a list, that whenever you click one of the element, 开发者_开发问答it will change the content of the gridfieldmanager.

Thank you very much!


If I understand correctly, you want to set a FieldChangeListener on the field returned from getFieldAtIndex()? And the field returned happens to be a HorizontalFieldManager - is that correct?

If so, then you should be able to set a new change listener like so: gridField.getFieldAtIndex(0).setChangeListener(newChangeListener);

I'm not sure if that's what you're asking - so feel free to elaborate a bit more if this isn't the answer you're looking for.


Manager is a subclass of Field - that's why it's returned as a field by the GridFieldManager, from what I can decipher in your post you're attempting to get around the fact that you can't assign a change listener to a Manager... why would you ever want to do that anyway? Maybe go back to the basics of fields and managers and you'll see an easy way of doing what you're trying.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜