SAP Control framework–CL_GUI_TOOLBAR

引用:

282 views

1.1.1 定义

定义一个工具栏,里面有很多按钮或者下拉列表,可以选择其中的功能,以实现程序中的逻辑控制。

1.1.2 属性

几个constants:

M_ID_FUNCTION_SELECTED

M_ID_DROPDOWN_CLICKED

M_MODE_VERTICAL

M_MODE_HORIZONTAL

1.1.3 方法

CONSTRUCTOR

PARENT container的名字

DISPLAY_MODE 设置显示的模式

M_MODE_HORIZONTAL or M_MODE_VERTICAL

创建toolbar,并设置显示的模式

FILL_BUTTONS_DATA_TABLE

FCODE Function Code

ICON Icon

DISABLED State

BUTN_TYPE Style

TEXT Text

QUICKINFO Tip

DATA_TABLE Button Data Table

添加一个button到存储button的内表中

SET_BUTTON_STATE

ENABLED Enabled or Disabled

CHECKED Pressed or Released

FCODE Function Code Associated with the Button

设置button的状态,激活的还是禁用的?是否已经选择?

TRACK_CONTEXT_MENU

CONTEXT_MENU Context Menu

POSX X Coordinate

POSY Y Coordinate

跟踪context menu的信息

DELETE_ALL_BUTTONS

删除所有的button

SET_BUTTON_INFO

FCODE Function Code Associated with Button

ICON Icon Name

TEXT Text Shown to the Right of the Image

QUICKINFO Purpose of Button Text

当你需要动态的设定button的信息的时候,这个方法就有用了

ADD_BUTTON

FCODE Function Code Associated with Button

ICON Icon Name

IS_DISABLED Button Status

BUTN_TYPE Button Types Defined in CNTB

TEXT Text Shown to the Right of the Image

QUICKINFO Purpose of Button Text

最基本的添加按钮的方法

ADD_BUTTON_GROUP

DATA_TABLE TTB_BUTTON Table for Button Data

添加一组button,可以和方法FILL_BUTTONS_DATA_TABLE组合起来用,更方便。

DELETE_BUTTON

删除单个按钮,不详细介绍

ASSIGN_STATIC_CTXMENU_TABLE

TABLE_CTXMENU Static Context Menu

SET_STATIC_CTXMENU

FCODE Function Code

CTXMENU Static Context Menu

UPDATE_TABLE_CTXMENU

FCODE F Code of a Pushbutton

CTXMENU Static Context Menu of a Pushbutton

TO_DELETE Delete Flag

UPDATE_TABLE_BUTTON

FCODE Function Code

ICON Icon Name of Pushbutton

DISABLED Is the Pushbutton Active?

BUTN_TYPE Button Type

TEXT Button Text

QUICKINFO Tool Tip

CHECKED Is the Pushbutton Pressed?

TO_DELETE Delete Flag

更新button的状态以及信息

CHECK_UNIQUE_FCODE

FCODE Function Code

检查function code是否唯一

ON_CTXMENU_CHANGED

1.1.4 事件

FUNCTION_SELECTED

FCODE Function Code

当按钮被选择时触发

DROPDOWN_CLICKED

FCODE Function code

POSX X Coordinate

POSY Y Coordinate

转载于:https://www.cnblogs.com/wequst/archive/2009/06/29/1513327.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值