1、显示:CUIProperties::ShowContainerProperty
修改为:
//hscrollbar
pPropContainer->GetSubItem(tagHScrollBar-tagContainer)->SetValue((_variant_t)(pContainer->GetHorizontalScrollBar()==NULL?false:true));
pPropContainer->GetSubItem(tagHScrollBar-tagContainer)->SetOriginalValue((_variant_t)(pContainer->GetHorizontalScrollBar()==NULL?false:true));
//vscrollbar
pPropContainer->GetSubItem(tagVScrollBar-tagContainer)->SetValue((_variant_t)(pContainer->GetVerticalScrollBar()==NULL?false:true));
pPropContainer->GetSubItem(tagVScrollBar-tagContainer)->SetOriginalValue((_variant_t)(pContainer->GetVerticalScrollBar()==NULL?false:true));
2、保存:CLayoutManager::SaveControlProperty 增加:
CContainerUI* pContainer=static_cast<CContainerUI*>(pControl->GetInterface(_T("Container")));
if ( pContainer!=NULL ) {
if ( pContainer->GetHorizontalScrollBar()!=NULL ) {
pNode->SetAttribute("hscrollbar","true");
}
if ( pContainer->GetVerticalScrollBar()!=NULL ) {
pNode->SetAttribute("vscrollbar","true");
}
}
文档信息
- 本文作者:zhupite
- 本文链接:https://zhupite.com/duilib/duilib-duidesigner-save-and-show-vscrollbar-hscrollbar-properties.html
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)