Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User goready@163.com's Avatar
    Join Date
    Jan 2005
    Posts
    391
    我想产生如ie那样的hotbar的效果,选中按钮时hot图片,失去焦点时另一个图片,Grid能做到吗?该怎么做?谢谢!

  2. #2
    可以做到,下面是一种思路:
    你可以首先捕捉OfferKeyEventL取得键盘通知。然后根据需要置换Grid的图标,这里可能需要操作Icon Array,如
    iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL(iIcons);

    BestRegards
    hoolee

  3. #3
    Registered User goready@163.com's Avatar
    Join Date
    Jan 2005
    Posts
    391
    非常感谢,i will try it。

    我还想问一下,Grid怎样才能做到有背景图片或者背景色,每个button都有自己的背景? 不要是白底的,难看,我好像用不了AknsUtils::SetAvkonSkinEnabledL(ETrue);
    我的sdk是 6.1的版本,并且我也不想用系统的theme做背景。

  4. #4
    6.1上应该不可以,2.0上你可以参考AknsDrawUtils
    但Grid里也是没有这个设置的。


    BestRegards
    hoolee

  5. #5
    Registered User goready@163.com's Avatar
    Join Date
    Jan 2005
    Posts
    391
    我对自定义的控件非常有兴趣,也准备从现有控件派生出我自己的子类,现在看来从现有控件派生的局限性很大,自己写一个Grid、listbox等的类又是比较累,真是!

    grid里面字的位置是在哪里设置的,非常感谢

  6. #6
    Super Contributor r60600's Avatar
    Join Date
    Feb 2004
    Posts
    1,980
    没有这种方法,一般只可设置某个cell的位置。

    r60600

  7. #7
    Super Contributor Maxying's Avatar
    Join Date
    Apr 2003
    Location
    Tianjin, China
    Posts
    1,534
    既然楼主对自定义控件这么感兴趣,而且多数也是为控件增加自绘而更漂亮,那不如直接图形化他们,自己写一些控件,就像游戏中常用的ListView、Button等,这些都不是通过继承标准控件而得到,直接自己写反而比较容易。

    Maxying

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved