×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    May 2003
    Posts
    76

    using toolbar resource.....

    hi all,
    i want to use toolbar resource in my application..... i have defined a toolbar resource in the RSS file but facing some problems.... like

    1.) The tool bar appears on all the screens....and i dont want that
    2.) How to use different images for different buttons
    3.) How can initialize and hide the toolbar as required.... for me....


    if somone kow about this....... pls tell me

    Gaurav

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144
    Hi

    In case you are using Series 60, take a look to spane example, it does all the things you were asking for.

    yucca

  3. #3
    Regular Contributor
    Join Date
    May 2003
    Posts
    76

    that uses status pane.....

    hi yucca........

    thnx for info... but this example uses only the status pane for switching the view and i want to display a toolbar using a RESOURCE TOOLBAR structure.


    this example doesn't containe any thing about this resource.......

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    Are you sure you want it for Series60 and not for UIQ (ericsson P800)?

    As far as I know RESOURCE TOOLBAR is used only in UIQ.

    and in that case you can use SetToolbarL(); function in your ViewActivatedL() method.

    in Series 60 you have only RESOURCE CBA...

  5. #5
    Regular Contributor
    Join Date
    May 2003
    Posts
    76

    Toolbar Resource is thr

    hi,

    Look in to the SDK help TOOLBAR RESOURCE is thr.

    can anybody tell me how to add controls and images to that
    resource. (SERIES60 SDK)


    Gaurav

  6. #6
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    well, you are right. It is in the SDK help.

    But it is in Symbian section, not in Series 60 (it is not part of AVKON). And if I look at Nokia's Series_60_UI_StyleGuide I don't see where I should put toolbar... Do you want it instead of CBA? above CBA?

    Part of the SDK help is not too much relevant to Series 60. Consider this:

    ----------from SDK help:-------------

    CEikToolBar
    Support
    Supported from 6.0

    Description
    A vertical group of controls displayed down the left-hand side of an application containing buttons which are used to issue application commands, and other controls. A toolband may also be created using this class, by setting the EEikToolBarHorizontal flag and initialising from a TOOLBAND resource.

  7. #7
    Regular Contributor
    Join Date
    May 2003
    Posts
    76

    it's being displayed

    hi,

    you are right, that the resource toolbar is defined in thr symbian section.... but if it's not available in series60..... then why it's displaying the bar when i have defined the resource in the t
    .RSS file............

    i want to use it with CBA and placing it abve the CBA controls

    Gaurav

  8. #8
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    Does it really work?? Thats is pretty interesting. Well, one is learning something new every day...:-))

    How do you press these buttons?

    And have you tried if also works SetToolbarL(); function?

    But still I wouldn't use it. It is control that is not "natural" to Series60.

  9. #9
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    64
    I was inspired by the above discussion and started to develop an application with a tool bar.
    But I failed in the begining itself.
    I am unable to draw the grid.

    There is nothing drawn on the screen. The screen remains empty.

    Please suggest me some examples if any from where I can start.

    Is there anything to be done wrt sizechanged() function in the container

    The code which I am using is something like this
    //in the resource..

    RESOURCE TOOLBAR r_my_toolbar
    {
    controls=
    {
    TBAR_BUTTON
    {
    txt = "Button1";
    id=2011;
    },
    TBAR_BUTTON
    {
    txt = "Button2";
    id=2012;
    }
    };
    }

    //in my container......
    itoolBar = new (ELeave) CEikToolBar;
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader,R_MY_TOOLBAR);
    itoolBar->ConstructFromResourceL(reader);
    itoolBar->SetBoundingRect(TRect(0,0,10,150));
    itoolBar->DrawNow();
    CleanupStack::PopAndDestroy();

  10. #10
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    United Kingdom
    Posts
    95

    Blank ToolBand??

    Hi,

    I want to construct one toolband with images. but. it is showing only the blank rectangle.

    Have you guys succeeded in getting the toolband?

    Thanks and regards,
    Venkat

  11. #11
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    64
    I was able to show the images by specifying the bmpfile, bmpid, bmpmask in the rss file...

  12. #12
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    United Kingdom
    Posts
    95

    Still I am not able see the buttons

    I have tried with images also, but not able to get the buttons on toolbar.

    //
    .rss
    //

    RESOURCE TOOLBAND r_my_toolbar
    {
    length = 170;
    breadth = KEikStdToolBandHeight;
    flags=EEikToolBarHorizontal;
    controls=
    {
    TBAR_BUTTON
    {
    type=EEikCtCommandButton;
    id=EMButton1;
    flags=EEikToolBarCtrlIsStretchable;
    bmpfile=AVKON_BMPFILE_NAME;
    bmpid=EMbmAvkonQgn_prop_nrtyp_phone; //0xffff;
    bmpmask=AKNEXNOTE_IMAGE_MASK;
    },
    TBAR_BUTTON
    {
    type=EEikCtCommandButton;
    id=EMButton2;
    flags=EEikToolBarCtrlIsStretchable;
    bmpfile=AVKON_BMPFILE_NAME;
    bmpid=EMbmAvkonQgn_prop_nrtyp_phone; //0xffff;
    bmpmask=AKNEXNOTE_IMAGE_MASK;
    }
    };
    }

    Is there any problem with TBAR_BUTTON type?
    //
    Code in my container class.
    //

    iToolBar = new (ELeave) CEikToolBar;
    TResourceReader reader;
    //iToolBar->SetContainerWindowL(*this);
    iCoeEnv->CreateResourceReaderLC(reader,R_MY_TOOLBAR);
    iToolBar->ConstructFromResourceL(reader);
    //iToolBar->SetBoundingRect(TRect(0,150,100,200));

    CleanupStack::PopAndDestroy();

    Thanks,
    Venkat

  13. #13
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    64
    Hi Venkat,

    Are you able to see the toolbar and not able to see the buttons?
    Or
    U r not seeing the toolbar?

    If the toolbar is not visible then return toolbar control in the ComponentControl() function of the container.

    http://discussion.forum.nokia.com/fo...ht=%2Acatch%2A

    If the toolbar is visible I dont have an answer, ur code seems right for me.. and similar code worked for me

    Raja

  14. #14
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    United Kingdom
    Posts
    95
    Hi Raj,

    I am able to see the toobar, but there is nothing in the bar. It is showing empty rectangle.

    Can you give some snippet of working code.

    Regards,
    Venkat

  15. #15
    Regular Contributor
    Join Date
    May 2003
    Posts
    76
    Hi
    the same is happening withme also i am able to c a blank rectangle but not with all the buttons on it..

    RAJA are you using series 60 uiq sdk... cuz in that case it is possible obviously....

    Rgds
    GA

Posting Permissions

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