Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Changing MDI/SDI behavior at runtime 2008-05-21 -- Lee White > Can I change the way a window performs at execution time. I have an MDI
> window that I want to open as non-MDI under certain circumstances. If I
> start the procedure via a menu item I want to open as MDI (default). If I
> start the procedure via hand written code, I want to change it to non-MDI.
The MDI attribute of a window is defined when the window is created at
the OS level. To the best of my knowledge that cannot be changed once
the window has been created.
There is a way around this in Clarion but it involves some work to
accomplish. If your window is in a hand coded procedure it's a lot
easier to do. You can create a copy of the window without the MDI
attribute and use a reference within you code, such as...
Window1 WINDOW('Whatever'),AT(,,400,202),MDI
END
Window2 WINDOW('Whatever'),AT(,,400,202)
END
Window &WINDOW
CODE
IF MakeItMDI
Window &= Window1
ELSE
Window &= Window2
END
OPEN(Window)
The real work begins if you want to avoid the warnings about duplicate
controls. You have to use the 3rd parameter of USE() to prevent
duplication.
Today is November 21, 2024, 7:58 am This article has been viewed 35221 times.
|
|