diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 876eaa34e..3f1686014 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -277,7 +277,7 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); return ArrayUtils.addAll(getDefaultDescriptor(), crp); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index db6070178..f4cac3e15 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -30,6 +30,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; +import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeAdapter; @@ -118,7 +119,8 @@ public class XWTabFitLayout extends XWFitLayout { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + checkButonType(); + CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); return ArrayUtils.addAll(defaultDescriptor(), crp); } @@ -226,6 +228,12 @@ public class XWTabFitLayout extends XWFitLayout { private void checkButonType() { if (this.xCardSwitchButton == null) { + //假如为空,默认获取第一个tab的cardBtn属性 + try { + xCardSwitchButton = (XCardSwitchButton) ((XWCardMainBorderLayout) this.getTopLayout()).getTitlePart().getTagPart().getComponent(0); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } return; } boolean isStyle = ((WTabFitLayout) data).isCustomStyle();