I was wondering if anybody could help me with this.
I need textEditorDesc componet to grab keyboard focus when the dialogbox(modal) is activated, please see the code below.
How can I do it?
Thank you.
void cRefTypeTable::EditTypeDialog( ULONG item)
{
cEditRefItem editTypeDialogPane(item, m_pConn);
editTypeDialogPane.grabKeyboardFocus();
int i = DialogWindow::showModalDialog(T("Edit Item!"),&editTypeDialogPane,this,Colours::azure,true);
if(!i)
return;
RecordSetRefresh();
repaint();
return;
}
Please help. How do I use it? I’ve already tried everything that I could think of, how do I make a componet in the dialog(i.e. all created in constructor, jucer generated code) grab input when its presented to the user?
I’ve tried, please see the code below, is that what you mean?
One more thing, a dialog being modal is there a method that gets called (from DialogWindow::showModalDialog) right after the dialog is presented to the user? so that I could do
textEditorPassword->grabKeyboardFocus();
in it.
i.e. something like calledRightAfterDialogIsMadeVisible()
I was wondering, is this normal or am I doing something wrong? when a dialog is created and presented via DialogWindow::showModalDialog and I manualy set focus to a textEditor componet in it (i.e. to enter text), if I try to drag the dialog through its title bar the componet that I’ve been working in (textEditor componet, entering text) loses focus.
[quote=“appugno”]I’ve tried, please see the code below, is that what you mean?
One more thing, a dialog being modal is there a method that gets called (from DialogWindow::showModalDialog) right after the dialog is presented to the user? so that I could do
textEditorPassword->grabKeyboardFocus();
in it.
i.e. something like calledRightAfterDialogIsMadeVisible()