代码名称:实验各种对话框

作者/收集者:zixing

开发环境:MapBasic

代码:

include "mapbasic.def"
declare sub main
global gs_searchfor as string
sub main
dim i_details,l_showledend as integer
dim map_name,v_quarter,v_scope as integer
dim sym_variable as object
set style symbol(35,red,36)
dialog width 165 
height 190
title ""
control statictext
title "enter map title:"
position 5,10
control edittext
value "china"
into map_name
id 1
position 60,8
width 90
control groupbox
title "level of detail"
position 5,30
width 70
height 40
control radiogroup
title "&full detail;&partial details"
value 2
into i_details
id 2
position 12,42
width 70
control symbolpicker
position 95,45
into sym_variable
id 3
control listbox
title "first qrtr;2nd qrtr;3rd qrtr;4th qrtr"
value 3
id 5
position 5,90 
width 65
height 35
control multilistbox
title "streets;highways;towns;counties;states"
value 3
id 5
position 95,90
width 65
height 35
control popupmenu
title "town;country;territory;entire state"
value 2
into v_scope
id 6
position 5,140
control checkbox
title "include&legend"
into l_showledend
id 7
position 95,140
control button title "&reset" 
position 10,165 'calling reset_sub
control okbutton ' calling ok_sub
position 65,165
control cancelbutton position 120,165
end sub