Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2004

    CAknDialog Position


    i am deriving an own dialog from CAknDialog in order to get a dialog like the CAknTextQueryDialog but just with a custom menu - so long so good. I managed all the implementation and also screen position and size is equal to the query dialogs, as long as the orientation is in vertical mode.

    However if i switch to landscape mode the X position of my custom dialog does not equal the other dialogs X position. My dialog hides the scrollbar of the control behind the dialog (on the 5800) whereas other dialogs obviously somehow include the scrollbar width into their calculation. (my X pos > their X pos).

    Can you give me a hint on how to get the width of the scrollbar frame? GetDefaultScrollBarBreadth does not help. Also - as the AKN Dialogs can do it - there seems to be a generic way on how to get such width in order to include it into positioning calculations.

    Sigh - hope i could describe my problem in a way that you can understand it.


  2. #2
    Registered User
    Join Date
    Mar 2004

    Re: CAknDialog Position

    PS that is my position code - i am trying to emulate the CAknQuery... dialog positioning (they also override SetSizeAndPosition for that). The line marked by >> and << is responsible for setting the position i am talking about.

    void CPhoneNumberQueryDialog::SetSizeAndPosition (const TSize &aSize)


    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, cRect);

    if (cRect.Height() > cRect.Width())
    // vertical
    } else
    // landscape
    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, cRect);
    >> TInt iX = cRect.iTl.iX + cRect.Width() - aSize.iWidth - CEikScrollBar::DefaultScrollBarBreadth(); <<
    cPoint.iX = iX < 0 ? 0 : iX;
    cPoint.iY = Position().iY;


Similar Threads

  1. not able to get Latitude & Longitude values
    By smita.pawar in forum Symbian
    Replies: 7
    Last Post: 2008-10-08, 11:05
  2. Problem changing position of a CEikTextListBox
    By Ishibo San in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-08-25, 15:54
  3. positioning.position??
    By giapage in forum Symbian
    Replies: 15
    Last Post: 2008-04-18, 16:39
  4. Setting the screen position of a CAknDialog derived dialog box
    By curwenx in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-04-04, 07:39
  5. Size and position of a CAknDialog derived class
    By liadalex in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-09-04, 07:55

Posting Permissions

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