09-29-2010 05:01 AM
I am trying to develop a SuggestBox Field using the 4.5 API. I read a Thread where Peter had a discussion about this. But there was not much of implementation discussion on it and it couldn't help me much. So trying to start a new one that in the would help us get a full fledged reusable suggestbox Field. Here is what I do. (Please tell me if there is a better approach).
* I am extending a TextField.
* And in fieldChangeNotify() Iam trying to draw a rectangle that would cotain a list of values that i give it. Then I have to implement the navigation movement across the values and the onClick Event should feed the value to the TextField.
My problem here is, I am not sure as to how to repaint the box with the rectangle (the box should come over the screen just like Google search Field). I am taking a TextField because, this Suggestbox should actually allow the users to type inn values that are not in the list. Your valueable inputs please.
Solved! Go to Solution.
09-29-2010 05:25 AM
thanks for the quick reply aman. But how do I pass inn the new graphics for painting again? I dont have a provision for that. As far as I can see, when the user types inn a value, I have to redraw the field again with the rectangle section. I am not sure as to how I redraw it. Conventionally, I suppose invalidate would call the paint() again and it will paint the same text field. how do i come over this?