theButtonWidth = max(
	zstring_width(zstring:'$$$/Dialogs/ChooseContacts/Remove'),
	zstring_width(zstring:'$$$/Dialogs/ChooseContacts/Search'),
	zstring_width(zstring:'$$$/Dialogs/ChooseContacts/Browse'),
	zstring_width(zstring:'$$$/Dialogs/ChooseContacts/Info'),
	zstring_width(zstring:'$$$/Dialogs/ChooseContacts/Trust'));
	
theListBoxWidth = max_char_width() * 35;

theListBoxHeight = gEditTextHeight * 5;

dialog()
{
	view(align_children: align_left, alignment: align_fill)
	{
		static_text(item_id: 'note', alignment: align_fill);

		cluster(item_id: 'conC', name: '$$$/Dialogs/ChooseContacts/ContactsCluster', align_children: align_top, alignment: align_fill)
		{
			mclv(item_id: 'conL', height: theListBoxHeight, width: theListBoxWidth);
			
			view(align_children: align_left, alignment: align_fill) 
			{
				button(item_id: 'remv', name: '$$$/Dialogs/ChooseContacts/Remove', width: theButtonWidth);
				button(item_id: 'brws', name: '$$$/Dialogs/ChooseContacts/Browse', width: theButtonWidth);
				button(item_id: 'srch', name: '$$$/Dialogs/ChooseContacts/Search', width: theButtonWidth);
			}
		}

		cluster(item_id: 'cerC', name: '$$$/Dialogs/ChooseContacts/CertificatesCluster', alignment: align_fill)
		{
			static_text(item_id: 'cerN', alignment: align_fill);
			
			view(align_children: align_top, alignment: align_fill)
			{
				mclv(item_id: 'cerL', height: theListBoxHeight, width: theListBoxWidth);
				
				view(align_children: align_left, alignment: align_fill) 
				{
					button(item_id: 'info', name: '$$$/Dialogs/ChooseContacts/Info', width: theButtonWidth);
					button(item_id: 'trst', name: '$$$/Dialogs/ChooseContacts/Trust', width: theButtonWidth);
				}
			}
		}

		ok_cancel_help(ok_name: '$$$/Dialogs/ChooseContacts/Ok');
	}
}
