×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    280

    Textarea blinking problem

    I am using text area in my form . I am putting it in center position of border layout. When i click on it it blinks and text on it shifts slightly to left.

    How to remove this problem

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Textarea blinking problem

    Quote Originally Posted by Manpreet_Singh View Post
    I am using text area in my form . I am putting it in center position of border layout. When i click on it it blinks and text on it shifts slightly to left.

    How to remove this problem
    It is LWUIT - TextArea, On which device are you facing this issue ?
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    May 2013
    Posts
    280

    Re: Textarea blinking problem

    I am using s40 with themes jar file . I am facing it on emulator itself. I tested on asha 310 but same result as emulator.

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Textarea blinking problem

    Can we take a look at your code?
    -CarlosDL

  5. #5
    Registered User
    Join Date
    May 2013
    Posts
    280

    Re: Textarea blinking problem

    here is it:
    Code:
     thoughttext=new TextArea();
      
       String lastthought=(String)vthought.elementAt(size);
       System.out.println("last thought is::"+lastthought);
       thoughttext.setText(lastthought); 
       thoughttext.setRows(lastthought.length());
       thoughttext.getUnselectedStyle().setBorder(null, false);
       thoughttext.setPreferredH(middlecomponentHT);
       System.out.println("get the height of middle component is:"+thoughttext.getPreferredH());
       thoughttext.setEditable(false);
       thoughttext.setSingleLineTextArea(false);        
       thoughttext.setGrowByContent(true);       
       
      thoughttext.setFocus(false);
      thoughttext.getUnselectedStyle().setAlignment(Component.CENTER);
      thoughttext.getUnselectedStyle().setBgColor(11053224);
    Last edited by Manpreet_Singh; 2013-08-13 at 06:33.

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Textarea blinking problem

    That is probably happening because of these lines:

    Code:
    thoughttext.getUnselectedStyle().setBorder(null, false);
    thoughttext.getUnselectedStyle().setAlignment(Component.CENTER);
    thoughttext.getUnselectedStyle().setBgColor(11053224);
    You are only modifying the UnselectedStyle, that's why it looks different when you click or tap on it.
    Last edited by cadlg; 2013-08-14 at 00:31. Reason: Submitted to early ;)
    -CarlosDL

  7. #7
    Registered User
    Join Date
    May 2013
    Posts
    159

    Re: Textarea blinking problem

    hiii vikrant here working on same project .but my problem is same till now .i change the text in textArea on click but some time text dosnt change but in console the value is change but text is not set on textarea please tell me what is problem
    my code is give below
    [CODEE] thoughttext=new TextArea();

    String lastthought=(String)vthought.elementAt(size);
    System.out.println("last thought is::"+lastthought);
    thoughttext.setText(lastthought);

    thoughttext.setRows(lastthought.length());
    thoughttext.getUnselectedStyle().setBorder(null, false);
    thoughttext.setPreferredH(middlecomponentHT);
    System.out.println("get the height of middle component is:"+thoughttext.getPreferredH());
    thoughttext.setEditable(false);
    thoughttext.setSingleLineTextArea(false);
    thoughttext.setGrowByContent(true);

    thoughttext.setFocusable(false);
    thoughttext.getUnselectedStyle().setAlignment(Component.CENTER);
    thoughttext.getUnselectedStyle().setBgColor(11053224);
    thoughttext.setSingleLineTextArea(false);
    thoughttext.getSelectedStyle().setAlignment(Component.CENTER);[/QUOTE]
    PLEASE give me the solution of my problem
    Last edited by vikranttanwar@; 2013-08-14 at 14:12.

  8. #8
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Textarea blinking problem

    Hmm, you say your problem is the same, but the problem you are describing now seems to be a different thing. Do you still need help on the blinking/text-shifting issue?

    On the other hand, you didn't post the code where you change the text "on click", and that part is probably relevant to the problem you are describing.
    -CarlosDL

  9. #9
    Registered User
    Join Date
    May 2013
    Posts
    159

    Re: Textarea blinking problem

    thanks cadlg my problem solved now with the repaint() mehtod.
    Last edited by vikranttanwar@; 2013-08-16 at 07:53.

Similar Threads

  1. LWUIT TextArea Problem
    By zzwei in forum Mobile Java General
    Replies: 4
    Last Post: 2012-09-20, 10:12
  2. textarea can't be scrolled up/down
    By bg1fpx in forum Symbian
    Replies: 1
    Last Post: 2012-02-10, 19:46
  3. TextArea won't scroll
    By KimF in forum Nokia N9
    Replies: 1
    Last Post: 2012-01-08, 05:37
  4. TextArea Problem
    By nitant_flashlite in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2010-05-27, 03:15
  5. TextArea Bug
    By vvvnsk in forum Personal Profile
    Replies: 0
    Last Post: 2005-01-04, 10:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×