Hello!
I have a modal dialog lets call it TestDialog that is shown by using method
showDialog().
This TestDialog has three controls it's one richtextbox and two buttons.
The buttons is one Ok button and one Cancel button.
When this TestDialog is shown the user has two alternatives either write
something in the richtext box and then click the Ok button or click the
Cancel button ignoring whatever was written in the richtextbox field.
The user is not allowed to click the Ok button without writing anything in
the richtextbox. If he does some
information must be displayed telling him that some text must be written
when clicking the Ok button.
Assume the following sequence:
1. The user click the Ok button without writing anything in the richtextbox.
2. When the Ok button is clicked the TestDialog is closed.
3. I check if the Ok button is clicked and if the richtextbox is empy then I
use the MessageBox to give some information. When this information is given
from the MessageBox there is no visible TestDialog. When the user click Ok
in the MessageBox I display the TestDialog again. This works but I'm not
fully satisfied with the solution.
4. When this MessageBox is displayed the user can't do anything else because
this testDialog is modal but the user might be confused when the MessageBox
is saying something like enter text in the TestDialog when no TestDialog is
visible.
What I do want instead is if it would be possible to keep the TestDialog
visible if the user click the Ok button without writing anything in the
richtextbox. Then this MessageBox with some information is displayed above
this TestDialog given a better solution.
//Tony