?? 旋轉(zhuǎn)文本.mb
字號:
include "mapbasic.def"
declare sub main
declare sub mnu_textangle
declare sub rotate_text
global tabname() as string
global angle as float
sub main
create menu "改變文本角度" as
"文本角度" calling mnu_textangle
alter menu bar add "改變文本角度"
end sub
sub mnu_textangle
dim i as integer
dim tablenums as integer
tablenums = numtables()
For i = 1 To tablenums
redim tabname(i)
tabname(i) = tableinfo(i,TAB_INFO_NAME)
Next
dialog title "請從中選擇一個表,進行處理……"
Control statictext
title "請選擇一個表:"
position 5,5
Control listbox Position 5, 20
ID 1111
width 105 height 50
title from variable tabname
value 1
control statictext
title "轉(zhuǎn)角"
position 5,75
control edittext into angle id 2222 value 90 position 35,75
control okbutton Position 12,90 calling rotate_text
control cancelbutton position 65,90
end sub
sub rotate_text
dim j as integer
dim tablename as string
dim objalias as alias
dim myobj as object
angle=readcontrolvalue(2222)
tablename = tabname(readcontrolvalue(1111))
note tablename
fetch first from tablename
for j=1 to tableinfo(tablename,tab_info_nrows)
objalias = tablename & ".obj"
if objectinfo(objalias,obj_info_type) = OBJ_TYPE_TEXT then
myobj = objalias
alter object myobj Geography OBJ_GEO_TEXTANGLE,angle
update tablename set obj=myobj where rowid =j
end if
fetch next from tablename
next
end sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -