M
mehdi_mousavi
Hi folks,
Consider a dialog box, that contains a menu, toolbar and a tab control
that contains some pages, and the first tab page contains some textbox
controls as well as a datetimepicker and some buttons. Among the
textboxes I've mentioned, there's a textbox that is supposed to get the
address of a customer (including street, city, state, zipcode and the
like) all in a given multi-line textbox. So I've to parse the entered
string *and show the parsing result to the user* (in a new dialog box)
before leaving to another TabStop-enabled control, including other
pages of the tab control, the datetime picker ctrl and the like.
So, I've to purge any pending message already in the message queue, if
the parsed address is not confirmed by the user and keep the focus on
the address textbox. i.e., consider that an address is entered in the
multi-line textbox, and then user clicks on a second tab page of the
tab control with his mouse, or clicks on the dropdown arrow of the
datetime picker control. A dialog box is shown to the user to confirm
that the address is parsed correctly, and if he clicks on the ok
button, I've to process those pending messages.
However, the problem is that if user clicks on the "Cancel" button of
the confirmation dialog, I've to purge any messages (including those
clicks on second tab page, and the datetime picker control) and set the
focus to the address textbox, so neither the tab index is changed, nor
the datetime picker window opens up!
I tried many patterns to achieve this but there is always a problem, so
I decided to ask your help. The effect I'm trying to achieve is exactly
implemented in "Microsoft Small Business Accounting 2006", ie., I'm
trying to mimic that.
Any help would be highly appreciated,
TIA,
Mehdi
Consider a dialog box, that contains a menu, toolbar and a tab control
that contains some pages, and the first tab page contains some textbox
controls as well as a datetimepicker and some buttons. Among the
textboxes I've mentioned, there's a textbox that is supposed to get the
address of a customer (including street, city, state, zipcode and the
like) all in a given multi-line textbox. So I've to parse the entered
string *and show the parsing result to the user* (in a new dialog box)
before leaving to another TabStop-enabled control, including other
pages of the tab control, the datetime picker ctrl and the like.
So, I've to purge any pending message already in the message queue, if
the parsed address is not confirmed by the user and keep the focus on
the address textbox. i.e., consider that an address is entered in the
multi-line textbox, and then user clicks on a second tab page of the
tab control with his mouse, or clicks on the dropdown arrow of the
datetime picker control. A dialog box is shown to the user to confirm
that the address is parsed correctly, and if he clicks on the ok
button, I've to process those pending messages.
However, the problem is that if user clicks on the "Cancel" button of
the confirmation dialog, I've to purge any messages (including those
clicks on second tab page, and the datetime picker control) and set the
focus to the address textbox, so neither the tab index is changed, nor
the datetime picker window opens up!
I tried many patterns to achieve this but there is always a problem, so
I decided to ask your help. The effect I'm trying to achieve is exactly
implemented in "Microsoft Small Business Accounting 2006", ie., I'm
trying to mimic that.
Any help would be highly appreciated,
TIA,
Mehdi