515439429 发表于 2015-9-22 07:22:47

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
页: [1]
查看完整版本: SAP Control framework–CL_GUI_TOOLBAR