MiniToolbar Width & Height
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14827
Printed Date: 04 May 2024 at 8:26am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: MiniToolbar Width & Height
Posted By: jpbro
Subject: MiniToolbar Width & Height
Date 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
|
Replies:
Posted By: mgampi
Date 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
|
Posted By: jpbro
Date 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:
- 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.
- 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).
- A way to limit the maximum width that a MiniToolbar would become when auto-size (MiniToolbar.MaxWidth property).
- 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
|
|