![]() |
How to set toolbar' button caption is left aligne |
Post Reply
|
| Author | |
siwen
Newbie
Joined: 23 January 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: How to set toolbar' button caption is left alignePosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2009 at 2:08am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2009 at 7:19am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2009 at 3:13pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 January 2009 at 10:41pm |
|
isee, but i don't want have icon.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 January 2009 at 1:27am |
|
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 |