Print Page | Close Window

Make CXTPControlEdit resize-able and align-able

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=18142
Printed Date: 09 May 2024 at 6:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Make CXTPControlEdit resize-able and align-able
Posted By: zeiga
Subject: Make CXTPControlEdit resize-able and align-able
Date 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.



Replies:
Posted By: Oleg
Date Posted: 05 April 2011 at 4:04am
Try pControlEdit->SetFlags(xtpFlagRightAlign);

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: zeiga
Date Posted: 05 April 2011 at 12:26pm
Originally posted by oleg oleg wrote:

Try pControlEdit->SetFlags(xtpFlagRightAlign);

Thanks, but it does not work unfortunately. Unhappy



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net