tool
bands
band
tools
customizelistbox
2、添加主菜单:
在form中添加一个activebar―>对其右单击选中快捷菜单中的属性―>弹出activebar设计器界面(左侧的treeview中显示当前activebar的资源,右侧显示选中资源的属性->右单击资源栏中的bands添加一个menubar为工程的主菜单项->右单击刚刚添加的主菜单添加若干button作为主菜单的各个显示项。
其中:aligntoform确定activebar是否填充整个form
3、添加一级菜单
右单击资源栏中的bands添加一个popupmenu为工程的一级子菜单项->右单击一级子菜单添加若干button作为一级子菜单的各个显示项。->将主菜单的相应显示项的subbands值设置为此一级子菜单的name值。
4、添加二级菜单
右单击资源栏中的bands添加一个popupmenu为工程的二级子菜单项->右单击二级子菜单添加若干button作为二级子菜单的各个显示项。->将一级子菜单的相应显示项的subbands值设置为此二级子菜单的name值。
5、实现菜单的check选项
在程序相应的菜单中使用abar.bands("menutool").tools.item("…").checked = not aabar.bands("menutool").tools.item("…").checked来实现check选项的乒乓。
6、工具栏
工具栏的实现方法与菜单相似
captionpostion――工具栏中的文字相对于图标的位置
style――工具栏中显示文字或图标还是文字图标都显示
displaymoretoolsbutton――determines if the more tools button is displayed on the band.
5.重要属性
|
activeband |
返回包含一个带有输入焦点按钮的带区(例如一个文本框或组合框)。数据类型为 band。 |
activebar |
|
align |
返回/设置一个值,决定对象在窗体上的显示位置。数据类型为 integer。 |
activebar |
|
aligntoform |
决定 activebar 是否填充整个 sdi 窗体的客户区。数据类型为 boolean。 |
activebar |
|
autosizechildren |
龆?activebar 是否在 sdi 窗体上重新配置子控件。数据类型为 boolean。 |
activebar |
|
autoupdatestatusbar |
决定如果一个是当前的 activebar 是否自动更新状态栏。数据类型为 boolean。 |
activebar |
|
clientareaheight |
返回客户区的高度。数据类型为 long。 |
activebar |
|
clientarealeft |
返回客户区的左边距。数据类型为 long。 |
activebar |
|
clientareatop |
返回客户区的上边距。数据类型为 long。 |
activebar |
|
clientareawidth |
返回客户区的宽度。数据类型为 long。 |
activebar |
|
controlfont |
返回/设置组合框和文本框的字体。数据类型为 stdfont。 |
activebar |
|
displaytooltips |
决定是否当用户悬停载按钮上方时显示工具提示。数据类型为 boolean。 |
activebar |
|
font |
返回/设置显示在按钮上文字的字体。数据类型为 stdfont。 |
activebar |
|
menuanimation |
设置 activebar 菜单显示的样式。数据类型为 integer。 |
activebar |
|
menufontstyle |
决定菜单的字体是使用字体属性或者操作系统的设置。数据类型为 integer。 |
activebar |
|
personalizedmenus |
决定个性化(最近使用)菜单项的行为。数据类型为 integer。 |
activebar |
|
picture |
返回/设置工具栏的纹理图片。数据类型为 stdpicture。 |
activebar |
|
shadowcolor |
返回/设置 3d 阴影颜色。数据类型为 long。 |
activebar |
|
threeddarkshadow |
弹出式带区的 3d 阴影颜色。数据类型为 long。 |
activebar |
|
tools |
返回在使用运行时自定义的一个按钮集合。数据类型为 tool。 |
activebar |
|
userdefinedcustomization |
决定当用户在系统上下文菜单中单击“自定义”时是否使用默认自定义对话框。数据类型为 boolean。 |
activebar |
|
caption |
一个显示在页、窗口标题和带区头柄区的字符串。数据类型为 string。 |
band/tool |
|
displaymoretoolsbutton |
显示“更多按钮”按钮或仅仅只是一个指示器。数据类型为 boolean。 |
band |
|
flags |
一个双精度值来定义带区的某一些属性。数据类型为 double。 |
band |
|
grabhandlestyle |
如果要,表示带区头柄的的样式。数据类型为 integer。 |
band |
|
tools |
返回带区上的按钮对象的集合。数据类型为 tool。 |
band |
|
type |
表示带区的样式。数据类型为 integer。 |
band |
|
backcolor |
滑行页面的背景颜色。数据类型为 long。 |
childbands |
|
childbandbackgroundstyle |
滑行页子带区的背景样式。数据类型为 integer。 |
childbands |
|
childbandcaptionalignment |
滑动页子带区的文字对齐样式。数据类型为 integer。 |
childbands |
6.重要方法
|
applyall |
应用这个按钮的属性到所有与它有相同的编号的控件。 |
activebar |
|
customize |
在运行时开始自定义。 |
activebar |
|
gettoolfromposition |
设置一个屏幕位置,获得在这个位置上的带区或按钮。 |
activebar |
|
getbandfromposition | ||
|
loadlayoutchanges |
从一个字节数组中加载设计图信息。 |
activebar |
|
loadmenuusagedata |
加载菜单的使用数据。 |
activebar |
|
playsound |
从一个文获系统声音播放声音。 |
activebar |
|
recalclayout |
重新计算入坞和浮动的带区的设计图。 |
activebar |
|
refresh |
重绘所有的工具栏。 |
activebar |
|
registerchildmenu |
注册一个带有 activebar 的子菜单带区。 |
activebar |
|
savelayoutchanges |
保存正确的设计图信息到一个字节数组中。 |
activebar |
|
savemenuusagedata |
保存菜单使用数据。 |
activebar |
|
gettoolindex |
返回一个按钮的编号。 |
band |
|
popupmenu |
弹出菜单。 |
band |
|
popupmenuex |
不考虑区域地显示弹出菜单。 |
band |
|
refresh |
重新绘制工具栏。 |
band |
|
cbadditem |
添加一项到组合框控件中。 |
tool |
|
cbclear |
清除组合框中的内容。 |
tool |
|
setpicturemask |
设置按钮图片的蒙蔽色。 |
tool |
7.重要事件
|
bandclose |
当用户使用弹出菜单或浮动时关闭一个所选的带区时发生。 |
|
banddock |
当带区入坞时发生。 |
|
bandmove |
当一个工具栏在屏幕被移动时发生。 |
|
bandopen |
当用户用弹出菜单打开一个所选的带区时发生。 |
|
bandresize |
当带区被重新调整大小时发生。 |
|
bandundock |
当带区出坞时发生。 |
|
childbandchange |
当一个子带区被单击时发生。 |
|
combodrop |
当用户单击组合框的下拉箭头时发生。 |
|
comboselchange |
当在组合框中当前的所选项被改变时发生。 |
|
customizebegin |
开始自定义时发生。 |
|
customizeend |
自定义结束时发生。 |
|
error |
当一个 activebar 的内部的错误发生时发生。 |
|
mouseenter |
当一个按钮移动到一个按钮的区域时发生。 |
|
mouseexit |
当指针从一个按钮区域移动出来时发生。 |
|
newtoolbar |
当用户按下在“自定义”对话框中的“新建工具栏”按钮时发生。 |
|
queryunload |
当一个应用程序被关闭时发生,用异于 0 的值设置取消来告诉 activebar 释放关闭的窗体和控件。 |
|
reset |
当从“自定义”对话框中按下“重新设置”按钮或者在 activebar 控件上使用重新设置方法时发生。 |
|
textchange |
当文本框或组合框中的文字改变时发生。 |
|
toolclick |
当用户在一个按钮或选择菜单按下鼠标左键时发生。 |
|
tooldblclick |
当双击工具栏中的按钮时发生。 |
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



