Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenSheet & Response window

704 views
Skip to first unread message

Piotr Zielinski

unread,
Oct 22, 1998, 3:00:00 AM10/22/98
to
I've got problem with opening response window as MDI sheets. When I use this
function, they stop to behave as response and start to look like "normal"
Main windows. Does anybody know why? Is it possible to open response MDI
sheets?

Piotr

Rob Sleath

unread,
Oct 22, 1998, 3:00:00 AM10/22/98
to
Check the reasoning. If you need MDI then the user is allowed to go
between different windows in the MDI sheet. A response window does not
allow the focus to be on any other window in the application.

What is the interface requirement, maybe we can provide a better
option?

Rob Sleath
CPD
-- Please post in newsgroup, not via email --

LuPowell

unread,
Oct 22, 1998, 3:00:00 AM10/22/98
to
If you need the response window to open as an application modal window, use
the Open ( ) or OpenWithParm( ) method. Using OpenSheet ( ) causes any
window, regardless of defined type to behave as a sheet (child) of the
frame.

Using Open or OpenWithParm will produce the expected response window
behavior, and it will still have the frame as its parent.

Piotr Zielinski wrote in message ...

Piotr Zielinski

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to
I have to build ad aplication that LOOKS like MDI (with toolbars, main
window, microhelp, etc), but if you open one sheet you must not ne allowed
to do anything untill you close this window eg. close main window, open
another etc.(like in response). That are the client requirements. I don't
want to program every menu item or event so I would like sheets to be
response ones.

Hope you understood my problem.
PZ

Tom Ewall

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to
You can't have your sheet windows be response windows, but you could make
your sheet windows act like response windows. Have an instance variable in
the frame track if a window is already open. If so, don't allow another
window to be opened. E.g.

// Script to open window
IF NOT ib_window_opened THEN
OpenSheet( ... )
ib_window_opened = TRUE
END IF
// end of script

When a sheet is closed, set the boolean to FALSE so that a sheet can be
opened again.

Piotr Zielinski <ziel...@ii.pw.edu.pl> wrote in article
<LyVAppl$9GA...@forums.powersoft.com>...

Simon Caldwell

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to
I suspect there might be a better way of achieving what you want. In case
there isn't though, the following is a quick way to disable all menu items.
To disable menu items, when you are opening a sheet, call
mf_DisableAll(TRUE). This first stores the current settings
(enabled/disabled) of all menu items, and then disables them. To enable
them again, when closing the sheet, call mf_DisableAll(FALSE), this restores
the original settings.

In your frame menu:

Instance variables:
menu im_items[]
boolean ib_enabled[]

Function mf_DisableAll(boolean ab_disable):

menu lm_empty[]
boolean lb_empty[]
integer i, li_max

if ab_disable then
im_items = lm_empty
ib_enabled = lb_empty
li_max = this.mf_GetItems(this)
else
li_max = UpperBound(im_items)
end if

for i=1 to li_max
if ab_disable then
im_items[i].enabled = FALSE
else
im_items[i].enabled = ib_enabled[i]
end if
next

Function integer mf_GetItems(menu am_menu)
integer i, li_max, li_next

li_next = UpperBound(im_items)
li_max = UpperBound(am_menu.Item)
for i=1 to li_max
li_next++
im_items[li_next] = am_menu.Item[i]
ib_enabled[li_next] = am_menu.Item[i].enabled
if UpperBound(am_menu.Item[i].Item) > 0 then
li_next = mf_GetItems(am_menu.Item[i])
end if
next
return li_next

HTH

Simon

Piotr Zielinski wrote in message ...

0 new messages