×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    213

    highlight character in text field

    Hi,
    I have a text field in my gui and I want to highlight,for example, all the letters 'e' in the text.
    I can find the position of the letters.
    How can I draw a small rectangle around each character in a way that does not hide the character itself.
    I'm testing on n95.

    Thanks for any suggestion.
    Regards
    Assayag

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: highlight character in text field

    You can experiment with CTextView:ocPosToXyPosL/FindDocPos. Drawing is an other story, you may either succeed in setting the editor to be transparent, or you can experiment with containing a second control, which will Draw after the editor (the container class can not be used for this purpose, since it gets Draw-n before the editor).

  3. #3
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    213

    Re: highlight character in text field

    Thanks for reply
    Using CTextView:ocPosToXyPosL/FindDocPos I can find the rectangle dimensions.

    HTML Code:
    or you can experiment with containing a second control
    Suppose I'm using a rectangular label or an image control with colored rectange as bitmap.
    By calling DrawNow() it will display this second control over the editor but not in the background as you said.
    I'm still need to make transparency as you said in first option.

    How can I achieve this task, containers in symbian has no alpha channel like in iphone for example )-:

    Regards
    Assayag

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: highlight character in text field

    If you do not gc.Clear in the second control, it should not harm the actual screen content.

Similar Threads

  1. extracting data from form field text editor
    By syedshakeel2004 in forum Symbian User Interface
    Replies: 5
    Last Post: 2009-04-30, 17:26
  2. Which character is for line breaking in Text Editor?
    By omerkarim in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-11-08, 14:38
  3. Mysterious disappearing popup text field
    By kernj in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-10-05, 16:59
  4. Text field entry duplicate key strokes
    By gwhistance in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-18, 11:05

Posting Permissions

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