Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嘿,如何将元素()添加到 Spark 面板组件皮肤的 topGroup?例如,如果我创建一个自定义 UIComponent,然后创建一个使用 Spark 面板作为默认值的关联皮肤,我如何从皮肤中将元素添加到 topGroup?谢谢!
您为什么不从 Panel 继承您的自定义组件?
覆盖 partAdded/partRemoved 方法。在partAdded 中,只需将定义的SkinPart 添加到topGroup。就像是 :
if (instance == yourSkinPartId) topGroup.addElement(yourSkinPartId)