×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Sep 2003
    Posts
    169

    Setting a background image on CAknGrid

    Hey,

    Did anybody try to set a bitmap as a background image of a CAknGrid derived grid control? I know you have to use Gc (graphics context) to do that but I can't seem to get the Gc for the grid control. I can set a picture as a background image of a view just fine using this code:

    // ...some standard code omitted
    _LIT(KpathAppMbm,"\\system\\apps\\gtest\\test.mbm");
    CFbsBitmap* background_bitmap = iEikonEnv->CreateBitmapL( KpathAppMbm, 0);
    CleanupStack::PushL( background_bitmap );
    gc.BitBlt(aRect.iTl ,background_bitmap);
    CleanupStack::Pop(1);

    However when I try to use this on a grid by assigning this Gc to that of the ItemDrawer for the grid using ItemDrawer's SetGc method it doesn't work. The background is still white....
    Any help is greatly appreciated.

    Regards, Aljaz

  2. #2
    Regular Contributor
    Join Date
    Sep 2003
    Posts
    169

    Setting a background image on CAknGrid

    Hey,

    I managed to solve part of the problem. The image wasn't showing 'cause the grid was taking up the whole screen. Still have to figure out how to make the grid transparent or something so I can see the background behind the grid. So if anyone knows something about this, any help is much appreciated.

    Regards, Aljaz

Posting Permissions

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