The GUI provides two possibilities to provide help to a dialog:
1) Using the event handler of an ordinary button,
2) Using the Help button on the titlebar.
The first case is clear:
The onHelpClick event handler belonging to the help button has to display a help topic.
When would you choose a [Help] button within the titlebar of a dialog, and when would you prefer a [Help] button within its client area?
I think that if you have narrow place for the client are then the Helpbutton in the titlebar is the better choice.
On the contrary, the big Help button is more user friendly.
Clicking help button moves focus on this button - it nerves sometimes. Clicking titlebar button does not.
If use helpResponder, then pressing "F1" on keyboard works automatically.
Set contextHelpId for children and parent helpResponder will get "help events" from children with contextHelpId-S you set.
If I understand your second answer well,
key F1 invokes automatically the help topic assigned to the help request but does not move the focus from the current control to the help button of the titlebar. This makes easier to define separate help topics for certain controls within the dialog, by checking the active control of the dialog.
When the Help button is one of the big visible buttons within the client area of the dialog the focus in on itself when the help request is processed, and the F1 button does not invoke the onHelp event handler automatically. The programmer has to define an onKey procedure calling the onHelp event handler.
Ferenc Nagy wrote:Hi,
This makes easier to define separate help topics for certain controls within the dialog, by checking the active control of the dialog.
Yes. Definitely. Very impotant in case of 99... fields to fill in :)
The setDecoration(buttons) procedure allows four buttons in the list of decoration buttons. In spite of it, not all 2^4 combinations are possible.
1) Both minimize button and maximize button must be present, xor misising.
2) They must be accompanied by the close button.
3) They inactivate the helpButton.
I could not solve the problem of uncloseable message window long ago specifying
[maximizeButton,minimizeButton].
buttons:=titlebar([closeButton,maximizeButton,minimizeButton]),% and pass denyClose() to
setCloseResponder(...).
The lookout the result is strange:
The X of the close button is visible on the titlebar of the message window. When the cursor is over it the background color of the X changes to red but the user clicks on it in vain.
You do not have the required permissions to view the files attached to this post.
Ferenc Nagy wrote:
3) They inactivate the helpButton.
If helpResponer is set key "F1" works both with and without helpButton on titleBar. And without titleBar at all "F1" works.
It's almost good, it's good enough
The question mark in the title bar is a Windows feature. It is also a Windows feature that the question mark cannot be combined with the minimize and maximize facilities.