Hi,
I have added a group on my application's ribbon bar. The actual requirement is, the controls should be evenly spaced as shown below.
However when I added controls, they appear quite unevenly spaced, as below. Please let me know, how to achieve even spacing.ASAP).
The code for this is a below.
pUndeformedDispGroup->SetControlsCentering();
pUndeformedDispGroup->Add(xtpControlLabel, IDS_ANALRES_TRANSLUCENCY_LABEL);
pUndeformedDispGroup->Add(xtpControlLabel, IDS_ANALRES_EDGES_LABEL);
pUndeformedDispGroup->Add(xtpControlLabel, IDS_BLANK_LABEL);
if(CXTPControlEdit* pUndefTransSpinCtrl = (CXTPControlEdit*)pUndeformedDispGroup->Add(xtpControlEdit, ID_ANALRES_UNDEFDISP_TRANSLUCENCY))
{
pUndefTransSpinCtrl->SetWidth(50 * g_nHiResFactor);
SESetStyle(pUndefTransSpinCtrl, xtpButtonIcon);
pUndefTransSpinCtrl->ShowSpinButtons();
}
if( CXTPControlComboBox* pEdgesCtrl = new CXTPControlComboBox())
{
pEdgesCtrl->SetWidth(100 * g_nHiResFactor);
SESetStyle(pEdgesCtrl, xtpButtonCaptionAndDescription);
pUndeformedDispGroup->Add(pEdgesCtrl, ID_ANALRES_UNDEFDISP_EDGES);
}
pUndeformedDispGroup->Add(xtpControlLabel, IDS_BLANK_LABEL);
if( CXTPControlComboBox* pFaceColCtrl = new CXTPControlComboBox())
{
pFaceColCtrl->SetWidth(100 * g_nHiResFactor);
SESetStyle(pFaceColCtrl, xtpButtonCaptionAndDescription);
pUndeformedDispGroup->Add(pFaceColCtrl, ID_ANALRES_UNDEFDISP_FACECOLOR);
}
if( CXTPControlComboBox* pEdgeColCtrl = new CXTPControlComboBox())
{
pEdgeColCtrl->SetWidth(100 * g_nHiResFactor);
SESetStyle(pEdgeColCtrl, xtpButtonCaptionAndDescription);
pUndeformedDispGroup->Add(pEdgeColCtrl, ID_ANALRES_UNDEFDISP_EDGECOLOR);
}
pUndeformedDispGroup->Add(xtpControlLabel, IDS_BLANK_LABEL);
if (CXTPControl* pControl = pUndeformedDispGroup->Add(xtpControlLabel, ID_ANALRES_UNDEFDISP_SELECT_FC))
{
SESetStyle(pControl, xtpButtonIcon);
}
if (CXTPControl* pControl = pUndeformedDispGroup->Add(xtpControlLabel, ID_ANALRES_UNDEFDISP_SELECT_EC))
{
SESetStyle(pControl, xtpButtonIcon);
}
Note : I tried using 'SetControlGrouping' but that makes my display worst.
------------- Thanks & Regards, Satyenjit Bagal. Software Development Engineer. SIEMENS Automation and Drives.
|