![]() |
How to set toolbar' button caption is left aligne |
Post Reply ![]() |
Author | |
siwen ![]() Newbie ![]() Joined: 23 January 2009 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() Posted: 23 January 2009 at 9:52pm |
How to set toolbar' any button caption is left aligned and font style, and disviable any btn's tooltip. thks
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
They have to be left aligned by default.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
siwen ![]() Newbie ![]() Joined: 23 January 2009 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
thk for your response. but it's not, my code is:
int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) { CXTPControlButton* pButton = (CXTPControlButton*)CXTPControlButton::CreateObject(); lpCreateControl->pControl = pButton; pButton->SetID(lpCreateControl->nID); pButton->SetIconId(ID_TOOLBAR_BTN_TEST_STR); pButton->SetStyle(xtpButtonCaption); pButton->SetFlags(pButton->GetFlags() | xtpFlagControlStretched ); pButton->SetPrompt("TestString"); } But "TestString" is center aligned, no left aligned |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Right - with xtpFlagControlStretched will be center aligned :( if you will add also icon will be left.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
siwen ![]() Newbie ![]() Joined: 23 January 2009 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
isee, but i don't want have icon.
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Can only suggest then create class derived from CXTPControlButton, override its OnDraw and manually draw caption.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |