CommandBar->Width |
Post Reply |
Author | ||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 02 December 2008 at 5:48pm |
|
From the SymbolReference.chm:
Width Property Description Gets / Sets the width of the toolbar when it is floating, displayed as a popup, or a mini toolbar. Syntax (Visual Basic) Public Property Width() As Long What is the unit the width is measured with? Pixels? Number of buttons? Furlongs? |
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Pixels.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
I am trying to set the width of a floating toolbar using "buttons" as the unit, as in "I would like my toolbar to be 3 buttons wide".
cntrlWidth == 0. How can I determine how wide, in pixels, a "3 button wide" toolbar is? |
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi, It doesn't look like ActiveX code :)
GetWidth return "user" width. You nede call GetSize to get actual width or just use Width = (22 * 3 + border_width)
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
Thanks for the reply.
Just to clarify, did you mean use the GetRect() method? There is no Size property on the CommandBarControl object... Nope, that's not the happenin' thing, either: pControl = pControls->Add(xtpControlButton, nAction, ""); pControl->GetRect(&left, &top, &right, &bottom); left, top, right, bottom all equal 0. |
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
Will '22' change, depending on whether large or small icons are used? Where does border_width come from?
Surprisingly, all the size fields, such as cxWindowBorders, are 0... (I confirmed with Spy++ that the hwnd variable is indeed the toolbar's HWND.) |
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
yes, it will be depend. Just make screenshot and calculate it :)
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
Any idea why pControl->GetRect(&a, &b, &c, &d) fills all params with 0? "make screenshot and calculate" is hard to do at runtime...
|
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
I mean this border has always same length. So just check this value.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
From the WTL Sample shipped with v12.1.0:
Frustrating. |
||
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
After you add button Add
m_spCommandBars->RecalcLayout();
to allow commandbars reclculate positions of new controls.
|
||
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 |