×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    384

    Question Creating textbox over listbox with border.

    Hi all,

    i am trying to create a text box over listbox.

    Textbox draws without any diificulty.

    But border for text box is not appearing.

    My code is given below

    Code:
    ResourceReader reader;
    	EikEnv()->CreateResourceReaderLC( reader,
                                         R_MOBILEDMR_LOGINVIEW_USERNAME_EDITOR );
        iSearch = new ( ELeave ) CEikEdwin;
    	AddControl(iSearch);
        iSearch->ConstructFromResourceL( reader );
    
    
        CleanupStack::PopAndDestroy();  // Resource reader
        TSize editorRect = TSize(iSearch->MinimumSize().iWidth, iSearch->MinimumSize().iHeight - 2);
        iSearch->SetExtent( TPoint( 10 , 5), editorRect);
        iSearch->SetBorder(TGulBorder::EHorizontalBar);
    
    	iSearch->SetFocus(ETrue);

    also i have tried following as well but nothing happens:-

    TGulBorder border;//( iSearch->Border() );
    border.SetType(TGulBorder::ESingleBlack);
    border.Draw( gc, border.OuterRect( rectEditor ) );


    Please Help

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Creating textbox over listbox with border.

    Yep, this problem has been discussed quite many times, one nice workaround is to draw the lines in the Draw function, and make the border that way.

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    384

    Re: Creating textbox over listbox with border.

    Quote Originally Posted by symbianyucca View Post
    Yep, this problem has been discussed quite many times, one nice workaround is to draw the lines in the Draw function, and make the border that way.
    Hi Yucca,

    I have also tried to DrawRect but this also not works..
    the code is as

    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
    gc.SetPenStyle( CGraphicsContext::ESolidPen );
    gc.SetPenColor(KRgbRed);
    gc.SetBrushColor( KRgbGreen);
    TRect rectEditor( 10,18,20,25 );
    //rectEditor.Grow(1, 1);
    gc.DrawRect(rectEditor);

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    384

    Question Re: Creating textbox over listbox with border.

    I Got Stuck on this issue.

    Any more help from anyone else....

  5. #5
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Creating textbox over listbox with border.

    maybe you should try drawing the rect a bit bigger.

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    384

    Question Re: Creating textbox over listbox with border.

    hi Yucca,

    i have tried with following parmaeters as well but no sucess.
    it even can't show any line on screen.


    TRect rectEditor( 10,18,100,100 );

Similar Threads

  1. EikCTL 42 Panic Error while creating ListBox (v2)
    By dotice in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-03-07, 06:02
  2. Textbox and Listbox
    By jensesaat in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-11-02, 10:29
  3. EikCTL 42 Panic Error while creating ListBox
    By Sneha1 in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-10-04, 15:31
  4. Problem in build with S60 1FP
    By Manuelito_ in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2007-09-18, 12:08
  5. Replies: 0
    Last Post: 2006-09-05, 04:43

Posting Permissions

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