Re: Top Level Form With Menu called from Modal form
- From: "Alex.K" <nomail@xxxxxxxxxx>
- Date: Sat, 21 Feb 2009 15:06:43 -0700
Stefan,
Thank you for the tip!
Strange that as a Form with .ShowWindow=2, Desktop=.t. and calling the DO
Menu with this, this.name in the Init event does not work, however, creating
a method in the form and copying the menu code and calling the forms method
to add the menu does work.
TA,
Craig
"Stefan Wuebbe" <stefan.wuebbe@xxxxxx> wrote in message
news:uwguuBAlJHA.2064@xxxxxxxxxxxxxxxxxxxxxxx
However, I do understand your point and agree with Modal to modeless,
unfortunately, VFP will not allow a modal with menu.
Craig,
You are right, forms can have integrated "SDI" menus if they are As-
Top-Level forms, i.e. .ShowWindow=2, but then they cannot be modal.
However, SDI menus also work with modal forms if form.Desktop=.T.
*
LOCAL loForm
loForm = CREATEOBJECT('ModalSDI')
loForm.Show(1)
RETURN
DEFINE CLASS ModalSDI as Form
*!* ShowWindow = 2 && or
Desktop = .T.
Caption = "Modal Form with SDI Menu"
AutoCenter = .T.
cMenuName = SYS(2015)
PROCEDURE Init
This.SDIMenu()
ENDPROC
PROCEDURE SDIMenu
DEFINE MENU (This.cMenuName) ;
IN (Thisform.Name) BAR
DEFINE PAD testpad OF (This.cMenuName) ;
PROMPT "testpad" COLOR SCHEME 3 ;
KEY ALT+T, ""
ON PAD testpad OF (This.cMenuName) ;
ACTIVATE POPUP testpop
DEFINE POPUP testpop MARGIN RELATIVE ;
SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF testpop PROMPT "Green"
ON SELECTION BAR 1 OF testpop _screen.ActiveForm.BackColor = 4259584
DEFINE BAR 2 OF testpop PROMPT "Blue"
ON SELECTION BAR 2 OF testpop _screen.ActiveForm.BackColor = 16711680
ACTIVATE MENU (This.cMenuName) NOWAIT
ENDPROC
ENDDEFINE
*
hth
-Stefan
"Alex.K" <nomail@xxxxxxxxxx> wrote in message
news:ORs3ik7kJHA.5732@xxxxxxxxxxxxxxxxxxxxxxx
Dan,
I believe that I am not!
The fact that our software package has been in use world wide for over 15
years from FoxBASE to VFP9 and within 2 days after releasing a compiled
version VFP9 sp2, I started receiving complaints about this specific
issue. And I have used it myself without issue prior to SP2.
Many modal forms are certainly nested, simply look at your reader and
select options, there will probably be advanced options that require the
launching of additional windows.
However, I do understand your point and agree with Modal to modeless,
unfortunately, VFP will not allow a modal with menu.
The specific design is a robust statement HTML editor that uses the
Dhtmled.ocx control along with all of the toolbar and menu options. To
modify/add lists of phrases within dropdown combos (another activex
control) and Lists. Our software uses dynamic forms with over 600
dropdowns throughout.
Now the issue is with one form (top level form) that displays a list of
selected statements that will appear on a completed document, from this
list they can launch a List editor window (modal) which can launch the
symbol / statement window (modal) that allows the user to add new or
modify their selections, this window contains one of the dropdowns
combos, if the dropdown does not contain the statement that the user
wants, the user is able to launch the statement editor window to control
the statements that are available within the dropdown combo.
It flows somewhat like Outlook - Main window - Open contact - click
Categories, Categories window (modal) - click Master List, Master List
window (modal) only our Master List editor is a full blown HTML editor.
So, I will need a way to allow the two modal forms to be modeless yet act
modal. They will need to be child windows of the open modeless window.
Looks like we would need to disable each window in succession as the next
one is launched.
What are your thoughts?
- Craig
"Dan Freeman" <spam@xxxxxxxxxxxxx> wrote in message
news:OVjCSV3kJHA.2460@xxxxxxxxxxxxxxxxxxxxxxx
I believe you are mistaken.
Modal forms were never intended to be nested, and certainly weren't
meant to call non-modal forms. The *point* of a modal form is that a
user must dispense with the task at hand before doing anything else.
Dan
Alex.K wrote:
Hello,
vfp9 sp2
I believe this worked prior to the sp2 upgrade.
I do not show the vfp._Screen.
Top level form 'A' with menu launches a modal form 'B', form 'B'
launches modal form 'C', form 'C' can launch Top Level Form with Menu
'D'.
Form 'D' does not respond to mouse input, sometimes locks up and
sometimes can close via window close button X.
Form 'D' is also launched throughout the application from other
modeless windows without any issues.
This is something new that I just ran into with installing SP2.
Any ideas?
TIA,
Craig
.
- References:
- Top Level Form With Menu called from Modal form
- From: Alex.K
- Re: Top Level Form With Menu called from Modal form
- From: Dan Freeman
- Re: Top Level Form With Menu called from Modal form
- From: Alex.K
- Re: Top Level Form With Menu called from Modal form
- From: Stefan Wuebbe
- Top Level Form With Menu called from Modal form
- Prev by Date: Re: Top Level Form With Menu called from Modal form
- Next by Date: Re: Top Level Form With Menu called from Modal form
- Previous by thread: Re: Top Level Form With Menu called from Modal form
- Next by thread: Re: Top Level Form With Menu called from Modal form
- Index(es):