?? show_mul_sel.mb
字號:
include "mapbasic.def"
include "menu.def"
include "icons.def"
declare sub main
declare sub sub1
declare sub sub2
declare sub sub3
declare sub WinClosedHandler
global mul_sel_list(15) as string
sub main
dim i as smallint
Open Table "C:\MapInfo\Professional\Map_Data\China\Capitals.tab" Interactive
Map From Capitals
redim mul_sel_list(tableinfo(capitals,tab_info_nrows))
fetch first from capitals
for i=1 to tableinfo(capitals,tab_info_nrows)
mul_sel_list(i)=capitals.capital_character_name
fetch next from capitals
next
create menu "showmulselrows" as
"showrows" calling sub1,
"exit" calling sub3
alter menu bar
add "showmulselrows"
end sub
sub sub1
dialog
title "show multi selected records"
control multilistbox
title from variable mul_sel_list
value 1
ID 9999
position 17,15
control okbutton
calling sub2
position 10,100
control cancelbutton
position 70,100
end sub
sub sub2
dim k as smallint
commit table capitals as "mulseltab"
open table "mulseltab"
delete from mulseltab
commit table mulseltab
pack table mulseltab data
fetch first from capitals
do
k=readcontrolvalue(9999)
if k=0 then
exit do
else
select * from capitals where capitals.capital_character_name = mul_sel_list(k) into mul_sel_tab
insert into mulseltab select * from mul_sel_tab
end if
loop while not eot(capitals)
browse * from mulseltab
end sub
sub sub3
end program
end sub
sub WinClosedHandler
if windowinfo(frontwindow(),win_info_type)=WIN_BROWSER and windowinfo(frontwindow(),win_info_table)="mulseltab" then
drop table mulseltab
drop table mul_sel_tab
end if
end sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -