![]() |
How to manage spacing between controls in a group? |
Post Reply ![]() |
Author | |
Satyen ![]() Groupie ![]() ![]() Joined: 22 December 2008 Location: India Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() Posted: 22 December 2008 at 1:30am |
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. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Don't add additional xtpControlLabel. Show Caption of Edit control instead.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Satyen ![]() Groupie ![]() ![]() Joined: 22 December 2008 Location: India Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
Thanks. The solution worked partially.
Now I have following display-
![]() I want to display caption as well as tooltip for all controls. Also I want to keep them a bit apart horizontally and vertically. For horizontal distance I removed earlier caption and added blank space (3 tabs) at its place.
I tried to add caption and tooltip using 'SetCaption' and 'SetToolTip' functions, but it distorted the display as below.
![]() Is there any way to 'show caption and tooltip. as well as keep controls apart'.
|
|
Thanks & Regards,
Satyenjit Bagal. Software Development Engineer. SIEMENS Automation and Drives. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |