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

Pane with MIN setting

When using the PaneBehavior=MIN setting, the text displayed has more space on the left than the right.
Is it possible to effect an equal spacing either side?

Colin

Comments

  • I might need your setup to see what you're seeing. I tried a couple different fonts and the text appeared evenly spaced within pane's borders. Note also that the SRP Editor has been using the feature for ages and they look correctly spaced too, even as the text changes.


  • Status bar image attached, as you can see the left is OK.
    Code to create is below, hope its not my code :)

    *
    * Status Bar
    *
    Ctrl=@WINDOW:".STATUS_BAR"
    Qualifier=1:@FM:"2*ICEMATE*OLE*":Ctrl
    Call Send_Message(Ctrl,"QUALIFY_EVENT","ALL_OLES",Qualifier)
    Call Set_Property(Ctrl,"OLE.PaneCount",7)
    Call Set_Property(Ctrl,"OLE.PaneBehavior[1]","FIX")
    Call Set_Property(Ctrl,"OLE.PaneBehavior[2]","FIX")
    Call Set_Property(Ctrl,"OLE.PaneBehavior[3]","MIN")
    Call Set_Property(Ctrl,"OLE.PaneBehavior[4]","FIX")
    Call Set_Property(Ctrl,"OLE.PaneBehavior[5]","MIN")
    Call Set_Property(Ctrl,"OLE.PaneBehavior[6]","STR")
    Call Set_Property(Ctrl,"OLE.PaneSpacing",4)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":StaffCodePane :"]",150)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":SecGroupPane :"]",100)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":ReadOnlyPane :"]",80)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":ImportDatePane:"]",150)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":ServerPane :"]",400)
    Call Set_Property(Ctrl,"OLE.PaneWidth[":StatusPane :"]",150)
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":StaffCodePane :"]","C")
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":SecGroupPane :"]","C")
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":ReadOnlyPane :"]","C")
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":ImportDatePane:"]","C")
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":ServerPane :"]","C")
    Call Set_Property(Ctrl,"OLE.PaneAlignment[":StatusPane :"]","C")
    Call Set_Property(Ctrl,"OLE.AllowXPTheme",1)
    Call Set_Property(Ctrl,"OLE.Resizable",0)
    Call Set_Property(Ctrl,"OLE.PaneColors[All]","Black":@FM:"XP":@FM:"Black":@FM:"XP")
    Call Set_Property(Ctrl,"OLE.PaneCaption[":StaffCodePane :"]","")
    Call Set_Property(Ctrl,"OLE.PaneCaption[":SecGroupPane :"]","")
    * Call Set_Property(Ctrl,"OLE.PaneCaption[":ReadOnlyPane :"]","")
    Call Set_Property(Ctrl,"OLE.PaneCaption[":ImportDatePane:"]","Import Date: ")
    Call Set_Property(Ctrl,"OLE.PaneCaption[":ServerPane :"]",Server)
    Call Set_Property(Ctrl,"OLE.PaneCaption[":StatusPane :"]","")
  • I see the issue. You are using a PaneSpacing of 4 while also enabling AllowXPTheme. In this case, the Windows theme draws a single vertical line at the end of a pane. Then you have the 4 spaces after the line before the next pane.

    Unfortunately, I can't assume that Windows will forever draw panes in this way, which means it would be kind of a hack to account for it. If you want the Windows theme, I suggest removing PaneSpacing. If you want the PaneSpacing, I suggest going without AllowXPTheme.
  • Thanks Kevin, I see the difference.
    I will play about with the settings to get a suitable mix.
Sign In or Register to comment.