[ Skill ] 键位不够用之 Toolbar
https://www.cnblogs.com/yeungchie/
code
act1 = hiCreateAction(
?name 'act1
?iconText "Act1"
?callback "println(\"Act 1\")"
)
cob1 = hiCreateToolbarComboBox(
?name 'cob1
?items list("T1" "T2" "T3")
?value "T1"
)
tpin1 = hiCreateToolbarTypein(
?name 'tpin1
?value "MET1"
?width
)
tbar = hiCreateToolbar(
?name 'tbar
?title "Test bar"
?items list(act1 cob1 tpin1)
)
hiPlaceToolbar(hiGetCurrentWindow() tbar 'top)
show
more
deManageToolbar(d_win d_toolbar [hiGetAppType(d_win)]) ; 添加到 UpdateWindowMenu 中,不建议跟 hiPlaceToolbar 同时使用,存在bug(可能)
deUnmanageToolbar(d_win s_toolbar [hiGetAppType(d_win)]) ; 取消添加到 UpdateWindowMenu 中
hiShowToolbar(d_toolbar) ; 显示 toolbar , 效果为在 UpdateWindowMenu 点击开启这个 toolbar
hiHideToolbar(d_toolbar [g_detach]) ; 隐藏 toolbar , g_detach 可选 (默认或 nil 时隐藏 , t 时删除)
hiAddToolbarItem
hiAddToolbarItems
hiInsertToolbarItem
hiInsertToolbarItems
hiDeleteToolbarItem
hiDeleteToolbarItems
- hiCreateAction
callback 返回 o_itemSym o_toolbar