目的:
有时我们需要把container 放在任意角落,并可调整大小,例如,ALV和选择屏幕都放在相同的屏幕上,为了实现这样的目的我们就需要用docking container
介绍:
我们都知道SAP Container是个 control,包含一些控件,例如,SAP Tree Control, SAP Picture Control, SAP Text edit Control, SAP Splitter Control等等,他集中地逻辑管理这些控件,并提供一个物理空间用于展示他们。所有的控件都依赖于一个container,因为这些container都是他们控制,你能嵌套他们,下面列举了5种SAP Containers:
1、SAP Custom Container
The SAP Custom Container allows you to display controls in an area defined on a normal screen
using the Screen Painter.
Class: CL_GUI_CUSTOM_CONTAINER
2、 SAP Dialog Box Container
The SAP Dialog Box container allows you to display controls in an amodal dialog box or
fullscreen.
Class: CL_GUI_DIALOGBOX_CONTAINER
3、SAP Docking Container
The SAP Docking Container allows you to attach a control to any of the four edges of a screen as
a resizable screen area. You can also detach it so that it becomes an independent amodal
dialog box.
Class: CL_GUI_DOCKING_CONTAINER
4、SAP Splitter Container
The SAP Splitter Container allows you to display more than one control in a given area by
dividing it into cells.
Class: CL_GUI_SPLITTER_CONTAINER
5、SAP Easy Splitter Container
The SAP Easy Splitter Container allows you to divide an area into two cells with a control in
each. The cells are separated by a moveable splitter bar.
Class: CL_GUI_EASY_SPLITTER_CONTAINER
有时我们需要把container 放在任意角落,并可调整大小,例如,ALV和选择屏幕都放在相同的屏幕上,为了实现这样的目的我们就需要用docking container
介绍:
我们都知道SAP Container是个 control,包含一些控件,例如,SAP Tree Control, SAP Picture Control, SAP Text edit Control, SAP Splitter Control等等,他集中地逻辑管理这些控件,并提供一个物理空间用于展示他们。所有的控件都依赖于一个container,因为这些container都是他们控制,你能嵌套他们,下面列举了5种SAP Containers:
1、SAP Custom Container
The SAP Custom Container allows you to display controls in an area defined on a normal screen
using the Screen Painter.
Class: CL_GUI_CUSTOM_CONTAINER
2、 SAP Dialog Box Container
The SAP Dialog Box container allows you to display controls in an amodal dialog box or
fullscreen.
Class: CL_GUI_DIALOGBOX_CONTAINER
3、SAP Docking Container
The SAP Docking Container allows you to attach a control to any of the four edges of a screen as
a resizable screen area. You can also detach it so that it becomes an independent amodal
dialog box.
Class: CL_GUI_DOCKING_CONTAINER
4、SAP Splitter Container
The SAP Splitter Container allows you to display more than one control in a given area by
dividing it into cells.
Class: CL_GUI_SPLITTER_CONTAINER
5、SAP Easy Splitter Container
The SAP Easy Splitter Container allows you to divide an area into two cells with a control in
each. The cells are separated by a moveable splitter bar.
Class: CL_GUI_EASY_SPLITTER_CONTAINER
程序代码:
ps:
1、定义按钮
2、设计屏幕
程序执行效果: