Hello friends,
I am facing problem in setting the focus in second control in my dialog.
By default focus is set on first DLG_Line.
I want to set focus on Second DLG_line.
<code>
RESOURCE DIALOG r_im_dialog
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagNoTitleBar | EEikDialogFlagWait | EEikDialogFlagCbaButtons;
buttons = r_im_cba;
form = r_im_form;
}
RESOURCE FORM r_im_form
{
flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
items =
{
DLG_LINE
{
type = EEikCtEdwin;
prompt = qtnBuddy;
id = EIMBuddyName;
control = EDWIN
{
width = 10;
maxlength = 511;
lines = KLines;
default_case = EAknEditorTextCase;
allowed_case_modes = EAknEditorAllCaseModes;
numeric_keymap = EAknEditorStandardNumberModeKeymap;
default_input_mode = EAknEditorTextInputMode;
allowed_input_modes = EAknEditorAllInputModes;
special_character_table = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
};
},
DLG_LINE
{
type = EEikCtEdwin;
prompt = qtn_Message;
id = EMessage;
control = EDWIN
{
//height=10;
maxlength = 511;
lines = KLines;
default_case = EAknEditorTextCase;
allowed_case_modes = EAknEditorAllCaseModes;
numeric_keymap = EAknEditorStandardNumberModeKeymap;
default_input_mode = EAknEditorTextInputMode;
allowed_input_modes = EAknEditorAllInputModes;
special_character_table = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
};
}
};
}
</code>
and in My application i am setting the focus in following way.
<code>
void CIMForm ::PreLayoutDynInitL()
{
CAknForm::PreLayoutDynInitL();
CEikEdwin* nEditor = static_cast <CEikEdwin*> (ControlOrNull(EIMBuddyName));
if(nEditor)
{ nEditor->SetFocus(EFalse);
nEditor->SetReadOnly(ETrue);
nEditor->SetFocusing(EFalse);
}
nEditor = static_cast <CEikEdwin*> (ControlOrNull(EMessage));
if(nEditor)
{
nEditor->SetFocus(ETrue);
}
}
</code>
Please help me .
Thanks,
Praveen.



