Multi-line readonly text box

Login to reply to this topic.
Thu, 2003-12-11 19:37
Joined: 2003-11-04
Forum posts: 63
What are all the flags needed to define a read-only multiline text box with scrollbar as a resource in a form (DLG_LINE). I am trying to view a log file, in a UI.

Sun, 2003-12-14 15:21
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2009
Multi-line readonly text box
Hi Joel,

This will open a dialog with a title and a scrollable read-only text:

Code:
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*msg);
dlg->PrepareLC(R_MESSAGE_NOTE);
dlg->QueryHeading()->SetTextL(*title);
dlg->RunLD();

The R_MESSAGE_NOTE is defined as:
Code:
RESOURCE DIALOG r_message_note
{
   flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
   buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
   items=
   {
       DLG_LINE
       {
          type = EAknCtPopupHeadingPane;
          id = EAknMessageQueryHeaderId;
          control = AVKON_HEADING
          {
          };
       },
       DLG_LINE
       {
          type = EAknCtMessageQuery;
          id = EAknMessageQueryContentId;
          control = AVKON_MESSAGE_QUERY
          {
          };
        }
   };
}

Cheers,
Eric

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Mon, 2003-12-15 17:46
Anonymous (not verified)
Forum posts: 2043
Multi-line readonly text box
Eric,
  I tried your suggestion, how do I get text to go onto seperate lines to see the scrolling work. Here is the code:

   CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(_L("Log"));
   dlg->PrepareLC(R_PAGER_LOG_DIALOG);
   dlg->QueryHeading()->SetTextL(_L("Hello\r\nWorld\r\nFoo\r\nBar\r\n"));
   dlg->RunLD();

Should I use something else in plcae of \r\n ?
Wed, 2005-04-13 07:38
Joined: 2004-05-21
Forum posts: 48
CAknMessageQueryDialog
Hi,

Can anyone show me the way where I can know when my CAknMessageQueryDialog is dismissed.

It doesnt have OkTOExit() method. Then whats the alternative for that.

Any code fragments will be a great help.

Thanx in advance...

Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India

  • Login to reply to this topic.