Silverfrost Forums

Welcome to our forums

why not the X

19 Sep 2014 11:19 #14680

Seems to me that I ought to have the Windows Title Bar X (Kill) available to use. But I don't - which seems strange. How is this feature shown but made non functional. Just curious. BYW the Silverfrost app is excellent! Bob

20 Sep 2014 6:43 #14682

Bob,

you create the window with

j = winio@(%ca[Title] ......... )

Then if you click X, j has the value zero. Therefore in the following line you can do something like

if (j == 0) return

Wilfried

20 Sep 2014 5:58 #14683

Just to enlarge on what Wilfried has said, many controls can have a callback function to service that control when it is selected, and some types of controls MUST have a callback (e.g. menus) and some can be specified without a callback - usually %bt buttons. The Close Window X is an example of that. Because WINIO@ is a function, it returns a value that can be tested for in the code that follows the last WINIO@. The codes start at zero (for the close X) and are assigned one by one to the controls as Clearwin+ set them up.

You probably need an introduction to %ww and %sy as well, if you want to produce the normal appearance of a master window, but do beware of generating the system menu on dialog boxes as that permits the user to maximise them.

Eddie

Please login to reply.