12-03-2013 01:23 AM
I have added image in VerticalFieldManager . In paint method of vfm i have used drawText() for adding text in manager.
Its need to add text in center of Image which changes on focus or click. Label is not fixed its dynamic text. So i used
drawText() not add().
Its working but i got issue while scrolling text. Text size is very large so entire text is not fixed on image its need to add horizontal scroll to text .
Please anyone tell me any solution for the same.
Thanks in Advance
Solved! Go to Solution.
12-03-2013 02:04 AM
I think you need to change your approach.
By your post, it seems you want the image as background only.
So you can set the image as background of VFM.
add a HorizontalFieldManager and add your LabelField.
For the following -Label is not fixed its dynamic text.
You can always change the text on LabelField by using its setText() method.
12-03-2013 04:43 AM
I agree with the other post that a change of approach is needed, though perhaps I would suggest a different solution.
I would avoid using paint in a Manager if you can possibly do so, however as a method of creating the background to the Manager it is usually OK. Though in the case you are using it to create a background, then I would use paintBackground().
But that does not help here.
I understand the requirement to be able to scroll long text, if you are ,displaying it in a single line. The first question to ask is do you have to display it in a single line?
Assuming that you do, then the next question is how does the user initiate this scrolling, or does it happen automatically. Can you think about this, as the possible solutions will vary depending on your answer.
12-03-2013 05:10 AM
Thanks Rishikesh and Peter,
I have mentioned here scrolling horizontally sorry for that. I need Marquee effect for that text which is single line.
I tried using above solution by Rishikesh but it gives me focus issue. whole manager is not focused when focus received only labelField background is gettinng focus.
Please tell me any solution for this.
Thanks in Advance
12-03-2013 05:26 AM
There are a number of Threads on the forum that talk about this. Please search. When searching you might also look for 'ticker' since I think it is called that sometime. You might find the following link useful: