gButtonWidth=max(
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Edit'),
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Pick'));

gRangeItemWidth = max_char_width() * 3;
gJavaItemHeight = gStaticTextHeight * 6;
gJavaItemWidth = max_char_width() * 19;

gEdit = '$$$/Dialogs/FieldProps/Edit';

gNo = '$$$/Dialogs/FieldProps/Validate/No';
gYesPart1 = '$$$/Dialogs/FieldProps/Validate/Yes/Part1';
gYesPart2 = '$$$/Dialogs/FieldProps/Validate/Yes/Part2';
gYesPart3 = '$$$/Dialogs/FieldProps/Validate/Yes/Part3';
gScript = '$$$/Dialogs/FieldProps/Validate/Script';

dialog(name: '$$$/Dialogs/FieldProps', target_id: 'tex1', first_tab: 'rad1')
{
	view(align_children: align_left, alignment: align_fill)
	{
		group()
		{
			radio(item_id: 'rad1', group_id: 'rgrp', name: gNo, next_tab: 'rad2');
			radio(item_id: 'rad2', group_id: 'rgrp', name: gYesPart1, next_tab: 'tex1');
			view(align_children: align_row)
			{
				gap(width: gGap);
				static_text(item_id: 'yes2', name: gYesPart2);
				edit_text(item_id: 'tex1', width: gRangeItemWidth, next_tab: 'tex2');
				gap(width: gGap);
				static_text(item_id: 'yes3', name: gYesPart3);
				edit_text(item_id: 'tex2', width: gRangeItemWidth, next_tab: 'rad3');
			}
			radio(item_id: 'rad3', group_id: 'rgrp', name: gScript, next_tab: 'java');
			view(align_children: align_top)
			{
				gap(width: gGap);
				edit_text(item_id: 'java', readonly:true, multiline: true, width: gJavaItemWidth, height: gJavaItemHeight, next_tab: 'edit');
				button(item_id: 'edit', width: gButtonWidth, name: gEdit, next_tab: 'rad1');
			}
		}
	}
}
