Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Ribbon too wide

edited February 12 in SRP Ribbon Control
Not sure when this started looking like this but the ribbon appears to be two wide for the window. Note in the image below the vertical scroll bar has a gap on the right-hand side and the horizontal scroll bar is missing. ocx 4.2.6.8. Icons are missing in the ribbon but that's because I am waiting on icons from a co-worker. This window has an mdi.


Comments

  • In OI 9, you need to use the LayoutChildControls method of the SRP Ribbon Control to set the positions of your controls that share the same window as the ribbon.
  • Yes, Understand, I am doing that for the two controls, see below. This was working.

    Old_Size = Get_Property("MAIN_TACTIC.STATUS", "SIZE")
    StatusSize = Get_Property("MAIN_TACTIC.STATUS", "ORIG_SIZE")
    Left = "0" ; // Anchor left to client left
    Top = -StatusSize<4> ; // Use control's original height to determine anchor from bottom
    Right = "-0" ; // Anchor right zero pixels from client right
    Bottom = "-0" ; // Anchor bottom zero pixels from client bottom
    Handle = Get_Property("MAIN_TACTIC.STATUS", "HANDLE")
    Call Send_Message("MAIN_TACTIC.RIBBON", "OLE.LayoutChildControl", Handle, Left:@FM:Top:@FM:Right:@FM:Bottom)
    New_Size = Get_Property("MAIN_TACTIC.STATUS", "SIZE")

    * Adjust the MDI client, taking the status bar into account
    Left = "0" ; // Anchor left to client left
    Top = "0" ; // Anchor top to pixel just beneath the ribbon bar
    Right = "-0" ; // Negative Zero means Zero pixels from the right
    Bottom = -StatusSize<4> ; // Anchor bottom to be just above the status bar
    Handle = Get_Property("MAIN_TACTIC.MDICLIENT", "HANDLE")
    Call Send_Message("MAIN_TACTIC.RIBBON", "OLE.LayoutChildControl", Handle, Left:@FM:Top:@FM:Right:@FM:Bottom)
  • edited February 12
    Hi Jim.
    >>This was working.
    Are you saying that you made the change and it is now working
    OR
    This has always been there that it was working and is now not?

    if the latter, if you have the srpeditor, click the 'Help->About' then the 'click to view' and see what controls version is actually registered.
  • It was working last I checked; my code has not changed and it's not working; I have updated the SRP ocx. I am using 3.4.10.0.
  • 12 years ago I had written some code that sized the mdi frame and status bar when it spread over more than one monitor. OI had a bug that incorrectly sized the mdi frame when it was on more than one monitor. I am usnure why but my code no longer works correctly and It was the source of the sizing issue.

    However if I remove my code, it now works correctly without my code and sizes correctly over more than mone monitor.

    So I have removed my code and it works as I want. I don't know what changed (or why my code no longer works as it did).
  • I could perhaps shed some light. When you set the SIZE property of a control, OI caches it so that it can deal with all the Autowidth and Anchor stuff. If, however, something other than OI sets a control size (like the Ribbon), then OI will reset back to the cached value when resizing. This was something I encountered a lot in the SRP Editor to get those side panels to work.
  • That makes sense, maybe this was never working when I started using the ribbon, I just noticed the glitch, maybe it had been there all along.

    Anyway, it's all good now.

    Thanks for the help everyone.
Sign In or Register to comment.