My previous email was sent just before I received yours. Your email further
clarified a number of things - many thanks.
Btw, I tried adding a menu to the PropertySheetDemo. The menu appears and
can be pulled down and selected:
::class 'PropertySheetDemoDlg' subclass PropertySheetDialog
::method initDialog
menuBar = .ScriptMenuBar~new("rc\PropertySheetDemo.rc", IDR_MENU1, , ,
.true)
menuBar~attachTo(self)
::method thing unguarded
say "'Thing' Menu Item selected."
But is seems that no events are fired - the "say" was not executed ("Thing"
is a menu item).
--
Oliver Sims
_____
From: Mark Miesfeld [mailto:[email protected]]
Sent: 23 February 2013 17:18
To: Open Object Rexx Users
Subject: Re: [Oorexx-users] Control Dialogs vs PropertySheet Dialogs
On Sat, Feb 23, 2013 at 7:45 AM, Oliver Sims
<[email protected]> wrote:
Ah-ha. So if I use PropertySheetDialog, I can't add any controls to the main
window. Is that correct?
Yes, basically. You can configure the PropertySheetDialog to have an
'Apply' and a 'Help' button also.
I just tried deleting the OK button from the .rc file, and nothing changed
when I ran PropertySheetDemo.rex. So I guess that OK and Cancel are provided
automatically.
There is no dialog template for the PropertySheetDialog in the .rc file.
The .rc file is shared between the PropertySheetDemo and the TabDemo
examples If you delete the button from the .rc file and run the TabDemo
example, you will see no Ok button.
The IDD_NEWCONTROLS_DLG template in the .rc file is *only* used by the
TabDemo example.
I also notice that there's no code at all for the main window other than the
::class statement.
Yes. For the most part it is not needed.
I have said this so many times, that I think I dream it in my sleep. ;-)
But, it is very key to understanding how to use a PropertySheetDialog
dialog.
PropertySheetDialog dialogs are unlike any other dialog in ooDialog. A
PropertySheetDialog is managed completely by the Operating System. All
other ooDialog dialogs are managed completely by the ooDialog framework.
I think the implications of this probably are not as readily evident to the
ooDialog programmer as they are to me. You can not connect any events for
the PropertySheetDialog dialog. There is no way for ooDialog to intercept
those events. The notifications are sent to the operating system. You
connect the events of the property sheet *page* dialogs.
There is no Ok or Cancel method for the PropertySheetDialog dialog. You
control closing, or preventing the closing, through the event notifications
of the *page* dialogs.
So if I were to say that, for PropertySheetDialogs, the programmer has no
control whatsoever over the content of the main window, and that the main
window will and can only contain the property sheets plus an OK and Cancel
button plus optionally a menu, would that be correct?
Mostly, but not entirely. As I said you can optionally have the Apply and
Help buttons. The Apply button is actually more standard. So, it is
probably more correct to say the Apply button is optionally removed from the
PropertySheetDemo. That was done to make the dialog look like the old
propdemo.rex example.
I don't know that you can add a menu, you probably can't. It is possible to
add a menu to the underlying PropertySheet window, but not recommended by
Microsoft. It takes some special hooks and I don't recall that I added
them. If there was some demand for that functionality, I could look into
it, to see if it is possible in ooDialog. But, I don't currently have any
plans to do it.
--
Mark Miesfeld
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users