×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2004
    Location
    Hellas
    Posts
    6

    Help for scroll bar design

    Hi everyone.

    I would like to add a scroll bar on the right hand side of my mobile phone screen because the information that I want to print is quite long.

    Do anyone of you have any ideas of how to design a scroll bar ????

    Thank you very much for your time
    HyacintH

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    why don't you just use standard Edwin to do it ? It handles the scrollers 7 other screen items correctly already.

    You could basically scroll it line-by-line and page-by-page, or as you wish basically. And if you set it non-focusing users can't input anything in it, nor see the cursor.

    yucca

  3. #3
    Registered User
    Join Date
    Jul 2004
    Location
    Hellas
    Posts
    6

    Yucca... heeeelp

    Hi Yucca

    Thank you very much for your fast reply.

    Could you please tell me step by step what should I do to use this Edwin functions that you suggested???

    I am new in Symbian and it is not clear to me.

    Thank you very much once more.
    zzz1980

    I FOUND THIS IN THIS FORUM BUT I GET ERRORS
    I DONT KNOW WHERE TO DECLARE WHAT....

    #include <eikedwin.h>

    CEikEdwin* iEdit8; // declared in CAppView class

    void CAppView::ConstructL()
    {
    iEdit8 = new (ELeave) CEikEdwin();
    iEdit8->SetContainerWindowL(*this);
    iEdit8->ConstructL(CEikEdwin::ELineCursor, 30, 20, 1);
    iEdit8->SetPosition(TPoint(60,200));
    iEdit8->SetSize(TSize(150,20));
    iEdit8->SetBorder(ETrue);
    iEdit8->SetTextLimit(30);
    iEdit8->SetObserver(this);
    iEdit8->ActivateL();
    iEdit8->DrawNow();
    ...
    }

    TInt CAppView::CountComponentControls() const
    {
    return 1; // Number of controls in your View class
    }

    CCoeControl* CMGAppView2::ComponentControl(TInt aIndex) const
    {
    switch (aIndex)
    {
    case 0:
    return iEdit8;
    default:
    return NULL;

    }
    }

    CMGAppView::~CMGAppView()
    {
    delete iEdit8;
    }

    void CMGAppView2::SizeChanged()
    {
    iEdit8 ->SetExtent (TPoint( 10, 23), TSize(190, 20));
    }

    According to the guy, this code adds the Edwin control to the View container derived from the CoeControl class.

    Last edited by zzz1980; 2004-08-23 at 14:24.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    looks good, so what sort of errors do you get ?

    also did you remember to construct the container, i.e. add the following lines to the contructL function:

    CreateWindowL();
    SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
    ActivateL();

    yucca

  5. #5
    Registered User
    Join Date
    Jul 2004
    Location
    Hellas
    Posts
    6

    The errors

    Hi again Yucca

    The first error that I am getting is about the header. It is not recognizable on this way.

    And after that (when I am using #include <eikedwin.h> instead of the one that it is suggested) I get undefined identifier errors for all the iEdit8-&gt; lines of the code.

    Finally, could you tell me where should I declare the
    CountComponentControls() and
    ComponentControl(TInt aIndex) functions ?

    As you can see I am still stuggling with the basics.

    Thank you very very much for your time
    HyacintH

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    ok try it lie this:

    iEdit8 = new (ELeave) CEikEdwin();
    iEdit8->SetContainerWindowL(*this);
    iEdit8->ConstructL(CEikEdwin::ELineCursor, 30, 20, 1);
    iEdit8->SetPosition(TPoint(60,200));
    iEdit8->SetSize(TSize(150,20));
    iEdit8->SetBorder(ETrue);
    iEdit8->SetTextLimit(30);
    iEdit8->SetObserver(this);
    iEdit8->ActivateL();
    iEdit8->DrawNow();

    Sometimes some characters gets magled here (home this post works)

    yucca

  7. #7
    Registered User
    Join Date
    Jul 2004
    Location
    Hellas
    Posts
    6

    I am sorry but I am new in Symbian

    Hello once more Yucca

    I have tried to change the names but I am still getting some errors.

    I it is not difficult for you ... could you tell me which line of these that I have found goes where ???????????

    for example, I dont know where to write the following lines of code:

    TInt CAppView::CountComponentControls() const
    {
    return 1; // Number of controls in your View class
    }

    I am terribly sorry Yucca but I am new in Symbian

    Thank you very much for your time :)

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    you basically most usually should have your function implementations for one class collected into one cpp file.

    So you just add it to mthe cpp file where you have other function for CAppView.

    Good source for information would be the example application that came with SDK. You might wanna have a look into editor example.

    yucca

Posting Permissions

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