Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Toolbar right-alignment problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar right-alignment problem

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar right-alignment problem
    Posted: 30 June 2009 at 4:41am
XTP 13.0.
 
I have two toolbars, and I want the second one to be right-aligned. This is how I do it:
 
if (m_pBar1->GetControls()->GetCount() == 0)
    m_pBar1->GetControls()->Add(xtpControlLabel, 0); // Dummy!
 
m_pBar1->GetControls()->GetAt(m_pBar1->GetControls()->GetCount() - 1)->SetWidth(1886);
DockRightOf(m_pBar2, m_pBar1);
 
My screen resolution is 1920x1440. If I increase 1886 to 1887, my right-most button disappears:
 
1886:
 
1887+:
 
 
I have no problem calculating this value from SM_CXSCREEN, but I sense you have a sizing bug here. It should be possible to put the toolbar to the right using a more 'general' value, such as 10000.
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2009 at 8:12am
Hi,
try xtpControlStretch flag for toolbar and xtpFlagControlStretched for label.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.