DuiDesigner修改:增加对控件vscrollbar,hscrollbar属性的显示和保存

2015/11/23 duilib 共 1007 字,约 3 分钟

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");
        }
    }

文档信息

Search

    Table of Contents