[fxruby-users] Is there a way to handle window (FXDialogBox) "close event" (or any other event/message)?

Lyle Johnson lyle at lylejohnson.name
Sat Jan 12 15:19:50 EST 2008


On Jan 12, 2008, at 6:29 AM, Vladimir Konrad wrote:

> I cannot figure out how to call a function (or have a block executed)
> when a FXDialogBox closes (to have some program variables set from the
> text-fields in the dialog).

It depends on how the dialog box closes. Usually, you would use a  
pattern like the following:

	dialog = FXFileDialog.new(...) # or some other kind of dialog box
	#
	# ... add code here to initialize the text fields in the dialog box  
equal to program variables...
	#
	if dialog.execute != 0
		#
		# ... add code here to set the program variables based on the new  
values of the text fields...
	end

Hope this helps,

Lyle


More information about the fxruby-users mailing list