开发者

Blackberry - BasicEditField with LabelField behaviour

开发者 https://www.devze.com 2022-12-16 23:23 出处:网络
I want a BasicEditField to behave just lik开发者_开发知识库e a label field. The reason I want this is I can\'t use a label field in my case as in case of 9500 the onFocus method does not work for some

I want a BasicEditField to behave just lik开发者_开发知识库e a label field. The reason I want this is I can't use a label field in my case as in case of 9500 the onFocus method does not work for some reason. But it does in case of basic edit field. So I need to create my own label field.


In user interface design, the concept of "Focus" is the locus to which user input is directed. Labels and other passive interface elements do not accept user input, so the concept of a label accepting focus does not make sense. Simularly having an active interface element become visible when focus is directed and an adjacent element, and invisible when the same adjacent element loses focus does not make sense. In order for the appearing and disappearing element to receive input it must first receive focus. This implies that first the adjacent element must lose focus causing the target input elment to become invisible. Usually invisible elements can receive neither focus nor input.

If you are determined to provide this user interaction I would suggest this:

Extend a Manager class, display a Label within. When the Manager, or any of it's children receives focus add your Buttons. When all the Manager's children no longer have focus remove your Buttons.

0

精彩评论

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

关注公众号