Calculating CommandBar Height |
Post Reply |
Author | |
MikeV
Newbie Joined: 03 January 2004 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 30 January 2004 at 11:47pm |
I know this was asked before by someone else but I didn't understand the answer, so let me try again: My problem is I need to position a tabstrip right below the where ever the CommandBar ends (since the system font can affect the CommandBar height) I would assume the solution is something like: for i = 0 to CommandBar.Count
next i My problem is; 1) I'm not getting any value returned in the variables I pass, and 2) Even if I did get a value would it represent Twips? If it's not twips what is it and how do i convert it to something I can work with? I looked through all the samples and didnt' see an example of this. Can someone (or Oleg ) post an example? Thanks |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
You should place the following code in the Form_Resize event: Dim Left As Long, Top As Long, Right As Long, Bottom As Long These variable will determine the boundary of the client area that is not being used by the CommandBars. Keep in mind that the bars can be docked to the left, right, and bottom, so getting the height isn't all you have to know. I may be mistaken, but I beleive the values are returned in your current scale mode (Twips by default). Now that you have this code, you can position your tabstrip. TabStrip.Move Left + 1, Top + 1, Right - Left - 2 This will give your tabstrip the proper Top, Left, and Width. Height is left unmodified. Hope this helps! |
|
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 |