zoukankan      html  css  js  c++  java
  • symbian Folder selection dialog (转)

    From Forum Nokia Wiki

    Here is an example on how to implement a Select folder dialog for S60 3rd edition, with common dialog classes.

    Source code

    TFileName folder;
     
     // Create select memory dialog
     CAknMemorySelectionDialog* memDlg = 
                 CAknMemorySelectionDialog::NewL(ECFDDialogTypeCopy, ETrue);
     CAknMemorySelectionDialog::TMemory memory = 
                CAknMemorySelectionDialog::EPhoneMemory;
     
     // Create select folder dialog
     CAknFileSelectionDialog* dlg = 
                 CAknFileSelectionDialog::NewL(ECFDDialogTypeCopy);
     
             // some dialog customizations:
     dlg->SetTitleL(_L("Select folder"));
     dlg->SetRightSoftkeyRootFolderL(_L("Back")); // for root folder
     
             TBool result = EFalse;
     
     for (;;)
     {
      if ( memDlg->ExecuteL(memory) == CAknFileSelectionDialog::ERightSoftkey )
      {
       // cancel selection
       break;
      }
     
      if (memory==CAknMemorySelectionDialog::EMemoryCard)
      {
       folder = PathInfo::MemoryCardRootPath();
      }
      else
      {
       folder = PathInfo::PhoneMemoryRootPath();
      }
     
      if (dlg->ExecuteL(folder))
      {
                              // we got our folder and finish loop
                              result = ETrue;
       break;
      }
     
     }
     
     delete memDlg;
     delete dlg;
    
    
  • 相关阅读:
    CSS布局口诀
    JAVA集合框架
    java接口作用及其好处
    java 输入输出类
    Java中精确计算的一个类BigDecimal
    java 集合框架
    java JSTL标签总结
    meta标签
    Java字符串使用总结
    Java集合框架使用方法
  • 原文地址:https://www.cnblogs.com/yaoliang11/p/1808074.html
Copyright © 2011-2022 走看看