/*
    mi_convert

*!  VERSION 1.0.4  29jun2009

*/

VERSION 11.0

INCLUDE _std_msmall
INCLUDE _ht160
INCLUDE header

HELP hlp1, view("help mi_convert")
RESET res1

DIALOG main, tabtitle("Main")						///
	label("mi convert - Change style of mi data")
BEGIN
  GROUPBOX gb_style	_lft	_top	_iwd	_ht8,			///
	label("Target style")
  RADIO rb_wide		_indent	_ss	_inwd	., first		///
	option(wide)							///
	label("Wide")
  RADIO rb_mlong	@	_ss	@	.,			///
	option(mlong)							///
	label("Marginal long")
  RADIO rb_flong	@	_ss	@	.,			///
	option(flong)							///
	label("Full long")
  RADIO rb_flongsep	@	_ss	@	., last			///
	onclickon("script main_rb_flongsep_on")				///
	onclickoff("script main_rb_flongsep_off")			///
	option(flongsep)						///
	label("Full long and separate")
  CHECKBOX ck_clear	_lft	_xls	_iwd	.,			///
	option(clear)							///
	label("Automatically discard data in memory")
  TEXT tx_name		_lft2	25	_vnwd	.,			///
	label("Name:")
  EDIT ed_name		@	_ss	_vnwd	.,			///
	label("Name")
END

SCRIPT main_rb_flongsep_on
BEGIN
	main.tx_name.show
	main.ed_name.show
END

SCRIPT main_rb_flongsep_off
BEGIN
	main.tx_name.hide
	main.ed_name.hide
END

PROGRAM command
BEGIN
	put "mi convert "
	option radio(main rb_wide rb_mlong rb_flong rb_flongsep)
	if main.rb_flongsep {
		require main.ed_name
		put " " main.ed_name
	}
	beginoptions
		option main.ck_clear
	endoptions
END
