Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - MiniToolbar Width & Height
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MiniToolbar Width & Height

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

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: MiniToolbar Width & Height
    Posted: 24 July 2009 at 11:45pm
When setting the mini-toolbar width property its hard to know how wide to set to account for the frame (especially with different skins). Perhaps we need a SetWidth method for the MiniToolbar object that sets the width of the client area (it is easy to add width of all added controls).

Also, a Height property is required in order to accurately position the toolbar using PopupMiniToolbar Y parameter since the toolbar appears *above* the specified Y position. In my case I need to position the top edge of the minitoolbar *at* the Y position, but this is difficult without knowing the height (I have to resort to ugly magic numbers).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2009 at 4:17am
Hi;

MFC version has a SetWidth function...
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2009 at 10:10am
Thanks mgampi, maybe it could be exposed in ActiveX by CJ, but I think we need more.

I thought it would be possible to determine the width of the MiniToolbar control using the Controll.Width property, but that always seems to return 0. So what I need:

  1. A way to get the total Width & Height of a MiniToolbar as it will be displayed on-screen in pixels. This is so I can position it as I please, but ensure that it does not extend past arbitrary object borders. (for example a report control row). Something like MiniToolbar.GetWidthHeight(w,h). I need this information before the MiniToolbar would be shown using PopupMiniToolbar (i.e. before the Hwnd is created) because I need to control the position of the MiniToolbar before it appears.
  2. A way to flag that the MiniToolbar should be auto-sized by width to fit the controls (for example, Width=0, MiniToolbar extends width automatically to fit all of the controls).
  3. A way to limit the maximum width that a MiniToolbar would become when auto-size (MiniToolbar.MaxWidth property).
  4. Note that the values returned by MiniToolbar.GetWidthHeight(w,h) would have to be calculated to include any auto-sizing. Those values should be exactly as the control will appear on a subsequent PopupMiniToolbar call.
Any thoughts? Thanks.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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.188 seconds.