Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Drawing skins in container

From Wiki
Jump to: navigation, search

Amrok90 -

If you use some label and want it's background to be consistent with the theme and with the background of the parent controller, change the parameters in this function:

void CYourAppView::SizeChanged() {

if(iBgContext) {

  iBgContext->SetRect(Rect());
  if ( &Window() )
      {
      iBgContext->SetParentPos( PositionRelativeToScreen() );
      }

}

}

this way:

1)here

iBgContext->SetRect(Rect());

change to

iBgContext->SetRect(Parent()->Rect());

2)here

iBgContext->SetParentPos( PositionRelativeToScreen() );

change to iBgContext->SetParentPos( TPoint(0, 0) );

(or here it may be iBgContext->SetParentPos( Parent()->Rect().iTl ); (parent's top left point)).

 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×