Multiple dialog boxes??

Started by edmoran, November 06, 2014, 10:41:13 AM

Previous topic - Next topic

edmoran

Can you have a calendar dialog pop up from an existing dialog box and have them both exist at the same time?

JTaylor

Depends on what you mean exactly.   If you display the dialog directly from the other dialog as part of the same script then you would have to close the Calendar before you could do anything with the original dialog.   If you needed both to be functional at the same time you would need to launch the calendar as a separate script but then you have to deal with the communication between the two scripts if you wanted the date from the calendar.

If you launch the calendar as a part of the original script be sure and use different variable names for the dialogs or you will create problems.

Jim

edmoran

Here's a bit more information as to what I want to do.  I have a dialog that users need to fill out.  One of the fields is going to be a date field.  I want to help them by popping up a second dialog with a calendar to help them choose the date.  Once they choose the date, the second dialog closes and the value gets transferred to the first dialog for the user to continue.

JTaylor

Yes.  That will work fine.   Just note the part about using a different dialog variable for the calendar dialog.

Jim

....IFICantBYTE

You could also keep it in the same dialog, but have it invisible when you don't want it used, and made visible when you do using DialogControlState(dialog-handle, control-name, request-code, style) with request-code being 3 or 4 and style being 1.
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

JTaylor

This is one of the controls where I wish they had used the DateTime Picker Control instead.   So much more useful and flexible.   Something one wouldn't need to hide or pop-up in a separate dialog.   I find the calendar control klunky and hate using it.  Pretty much a last resort kind of option for me.

Jim