Dialog resizing issue

I've built a very simple dialog in the dialog editor; it only contains 2 buttons.
resize1

The dialog is resizable. Both buttons are set to update Y and WS. However, when I resize the dialog, this happens:
resize2 (1)

The Ok button is updated, the Cancel button is ignored.

The issue is related to the tab order: In the above example, OK is in position 1. If I change the order, the Ok button remains unchanged instead of Cancel.

Removing the Shared Width setting still results in only one of the buttons' y-position being updated.

This is the dialog:

	<resource name="dlgTest" type="dialog">
		<dialog height="40" lang="english" resize="yes" width="64">
			<control close="0" default="yes" height="14" name="btnOk" resize="yws" title="Ok" type="button" width="25" x="5" y="26" />
			<control close="0" height="14" name="btnCancel" resize="yws" title="Cancel" type="button" width="25" x="33" y="26" />
		</dialog>
	</resource>

Is there any other setting I need to change or is this a bug? I've seen similar problems were recently fixed...

Thanks!

We're looking into why this affects resizing, but you can fix it by either turning off Close DIalog for the buttons, or giving them unique Return Value values.

1 Like

Aaaand it works! The return value was my mistake, of course. I didn't do anything else with that test form.
The connection between return values and resizing seems a little less than obvious... :wink:
Thank you!

It's because it was assigning both buttons the same ID behind the scenes, as both were treated like Cancel buttons if they're set to close the dialog with zero as the result.

Doesn't usually make sense to do that, but the result is also very confusing, so we've added a check for it in the next beta.

1 Like

Yeah, I was about to post "it seems to work for me!", but I did not set the "Close" flag.. o)

image