Skip to content

Commit 7df50fc

Browse files
committed
Add some docs to close a modal FXDialogBox
1 parent a0e7bba commit 7df50fc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rdoc-sources/FXDialogBox.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ module Fox
66
# +ID_CANCEL+ or +ID_ACCEPT+, the dialog box breaks out of the modal
77
# loop and returns a completion code of either 0 or 1, respectively.
88
#
9+
# A modal dialog can be closed directly from a button:
10+
#
11+
# FXButton.new(self, "&OK", nil, self, ID_ACCEPT)
12+
#
13+
# A modal dialog can also be closed from an event handler like so:
14+
#
15+
# FXButton.new(self, "&OK") do |bu|
16+
# bu.connect(SEL_COMMAND) do
17+
# handle(self, Fox.MKUINT(ID_ACCEPT, SEL_COMMAND), nil)
18+
# end
19+
# end
20+
#
921
# To close a dialog box when it's not running modally, simply call
1022
# {#hide} (or send it the +ID_HIDE+ command message).
1123
#

0 commit comments

Comments
 (0)