How can I make my ImageItem static in Form
Hi friends,
In My Midlet, Ian having 2 imagItems , 1st one is on the top n 2nd one is on the bottom, i want it be as a label means static in form .
i tried it to put this item into StringItem but as we can not put imageItem in StringItem.
What is do for this.
How can i focus on my LoginText ,i try to use setCurrentItem but it throws Exception.
parent.display.setCurrentItem(luserNameTextField)
throws exception.
best regards
karan
[488 byte] By [
karan88a] at [2007-11-27 0:13:15]

# 2
Hi supareno,
I mean to say that my imageItem which is on the top should behave like a Label (static appearnce)
as u know i created image than i set it into ImageItem ,but everytime cursor goes on that bcoz it cosider it as Item on the form.
How can i avoid it.
2 query-->
How can i use SetCurrentItem method for focus on the item.
like LoginTextField on the form.
it throws exception when i try it as
setCurrentItem(LoginTextField);
Where is wrong
--
karan
# 5
extract from the javadoc:
setCurrentItem
public void setCurrentItem(Item item)
Requests that the Displayable that contains this Item be made current, scrolls the Displayable so that this Item is visible, and possibly assigns the focus to this Item. The containing Displayable is first made current as if setCurrent(Displayable) had been called. When the containing Displayable becomes current, or if it is already current, it is scrolled if necessary so that the requested Item is made visible. Then, if the implementation supports the notion of input focus, and if the Item accepts the input focus, the input focus is assigned to the Item.
This method always returns immediately, without waiting for the switching of the Displayable, the scrolling, and the assignment of input focus to take place.
It is an error for the Item not to be contained within a container. It is also an error if the Item is contained within an Alert.
Parameters:
item - the item that should be made visible
Throws:
IllegalStateException - if the item is not owned by a container
IllegalStateException - if the item is owned by an Alert
NullPointerException - if item is null
Since:
MIDP 2.0
so are you sure that the item is initialized?