![]()  | 
 
Menubar width | 
 
    Post Reply  
   | 
  
| Author | |
   
   ddebono  
   
   Groupie  
   Joined: 02 August 2005 Location: Norway Status: Offline Points: 31  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Menubar widthPosted: 08 August 2005 at 1:41pm  | 
 
| 
   
    Oleg, Yes it seems like the toolbar is already wrapped, and there no way to turn it off. But the same thing also happens with the menu bar even though wrapping is turned off. You should look more into this.  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 07 August 2005 at 1:29am | 
 
| 
   
    GetWindowRect retruns current Width... I think Toolbar already wrapped so it returns wrapped Width of toolbar. 
  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   ddebono  
   
   Groupie  
   Joined: 02 August 2005 Location: Norway Status: Offline Points: 31  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 06 August 2005 at 6:36am | 
 
| 
   
    Hi, Stretch flag is this the xtpFlagHideWrap ? You example does not work. It still reports a much narrower width than needed. It seems that it reports no wider than the actual form width. What I use it for is when the fontsize and icon size goes from normal to large. And then find the width necessary. Private Sub FixMenuMode() Dim fntTmp As StdFont On Error GoTo Hell     Set fntTmp = Me.Font Hell: Private Function FindMenuWidth() As Long Dim lLeft As Long On Error GoTo Hell     CommandBars.ActiveMenuBar.EnableDocking xtpFlagHideWrap     CommandBars.RecalcLayout Exit Function Hell: Edited by ddebono  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 05 August 2005 at 11:42pm | 
 
| 
   
    You must disable stretch flag first. 
     CommandBars.ActiveMenuBar.EnableDocking xtpFlagHideWrap  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   ddebono  
   
   Groupie  
   Joined: 02 August 2005 Location: Norway Status: Offline Points: 31  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 August 2005 at 3:51pm | 
 
| 
   
    Thanks, 
 The EnableDocking worked, but not the GetWindowRect. The reason is that if the form is narrower than a toolbar, the GetWindowRect will report the actual left and right, and not the ones needed for non-clipping of the toolbar. Maybe a GetWindowNonClipping function or something ?  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 03 August 2005 at 4:54am | 
 
| 
   
    1. Try GetWindowRect method. 2. EnableDocking method + xtpFlagHideWrap  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   ddebono  
   
   Groupie  
   Joined: 02 August 2005 Location: Norway Status: Offline Points: 31  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 02 August 2005 at 5:37pm | 
 
| 
   
    How to find the width that the windows has to be to fit the menubar/commandbar ? And is it possible to turn off the menubar wrapping when the windows gets to narrow?  | 
 |
![]()  | 
 |
    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  |