⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show_mul_sel.mb

📁 很多的MAPINFO的常见问题下载后可以学习很有帮助
💻 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -