I'm having a problem changing the position of a control in a dialog. I've stripped things down to a very simple example, but still can't get it to work. I thought that calling SetPosition() on the control in the dialog's PostLayoutDynInitL() is all one had to do. The resource defines a dialog with one control - a label:
RESOURCE DIALOG r_help_dialog
{
flags = EEikDialogFlagNoDrag |
EEikDialogFlagFillAppClientRect |
EEikDialogFlagWait |
EEikDialogFlagCbaButtons ;
buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
items =
{
DLG_LINE
{
id = EHelpDialogLabel;
type = EEikCtLabel;
control = LABEL
{
txt = STR_HELP_SECTION_HEAD_1;
};
}
};
}
In PostLayoutDynInitL() I get the control, then move it over and down:
void CHelpDialog::PostLayoutDynInitL()
{
CEikLabel* label = static_cast< CEikLabel* >( ControlOrNull( EHelpDialogLabel ) );
label->SetPosition( TPoint( 10, 50 ) );
}
When the app runs the label text appears at ( 0, 0 ), as if SetPosition() did nothing. Ideas?
Thanks,
Dan



