对于可伸缩的FieldSet的收缩、伸展监听

    技术2022-05-12  1

     FieldSet控件可以设置可伸缩的属性,我们这么监听它的收缩及伸展呢?

    FieldSet groupSet = new FieldSet();          groupSet.setTitle("Test");          groupSet.setCollapsible(true);           groupSet.setWidth(800);          groupSet.setCollapsed(true);

    怎么对这个FieldSet进行收缩及伸展监听呢?代码如下:

                    groupSet.addListener(new PanelListenerAdapter(){                    public void onExpand(Panel panel) {                        MessageBox.alert("onExpand ");                    }                    public boolean doBeforeExpand(Panel panel, boolean animate) {                           return super.doBeforeExpand(panel, animate);                    }                    public void onCollapse(Panel panel) {                        super.onCollapse(panel);                    }                                    });

     

    我们可以在PanelListenerAdapter()方法里面按住alt+/键,来自己选择别的监听事件。


    最新回复(0)