Make CXTPControlEdit resize-able and align-able |
Post Reply |
Author | |
zeiga
Newbie Joined: 21 March 2011 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 30 March 2011 at 2:27pm |
Hi,
I created a search bar with CXTPToolBr which contains a CXTPControlEdit text box. Like the code shown below: CXTPToolBar* pToolBarSearch = pCommandBars->Add(_T("Search"), xtpBarTop); pToolBarSearch->ShowExpandButton(FALSE); pToolBarSearch->SetCloseable(FALSE); pToolBarSearch->SetShowGripper(FALSE); pToolBarSearch->EnableDocking(xtpFlagHideWrap); pToolBarSearch->EnableCustomization(FALSE); pToolBarSearch->SetButtonSize(CSize(20, 20)); pToolBarSearch->ShowTextBelowIcons(FALSE); CXTPControlEdit *pControlEdit = (CXTPControlEdit*) pToolBarSearch->GetControls()->Add(xtpControlEdit, ID_QUICKSEARCH); CString strEditHint((LPCTSTR) IDS_SEARCHHINT); pControlEdit->SetWidth(m_bUseSmallIcons? SEARCHBAR_SMALLWIDTH : SEARCHBAR_BIGWIDTH); pControlEdit->SetStyle(xtpButtonCaption); pControlEdit->SetBeginGroup(TRUE); pControlEdit->SetCaption(IDS_SEARCH); pControlEdit->SetEditHint(strEditHint); Now I want to make the text box (CXTPControlEdit) resize-able and can be aligned to the right of its parent dialog. Can anyone suggest a way to do it? Thanks.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Try pControlEdit->SetFlags(xtpFlagRightAlign);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
zeiga
Newbie Joined: 21 March 2011 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Thanks, but it does not work unfortunately.
|
|
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 |