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

Splitter properties not working

I am trying to make a splitter essentially invisible, by making the background the same as the Window, and no border.

CALL Set_Property(OLECtrlEntID,"OLE.Background","Window") CALL Set_Property(OLECtrlEntID,"OLE.Border","None")

The Background is set to white, rather than the window background.
The Border is not changed and remains a 1 pixel line.

Please can you advise if this is possible, or if an issue exists with the control.



  • Kevin,

    Actually, for expediency purposes, this is how I was setting the properties for my tests. Would you like me to switch to code to see if my background works differently?
  • Colin,

    This works for me for the most part so I have a few questions:
    1. What version of the SRPSplitter.ocx are you using? I am using 2.0.1
    2. Are you doing something specific to the background of the window? I am just curious why you are not setting the Background property to "None".
    3. When you say a 1 pixel line for the border remains, is this when you are dragging it or does it appear that way at rest?

    If you think it will help please post a screen shot.

  • Assuming you are not altering the color of the window itself, use "3DFace" for both the Background and the Border color. "Window" is the color of the editable portion of a window, like an editline. On most themes, that color is white. "3DFace" on the other hand is the color of the surfaces of 3D Controls like buttons and forms. It's counter intuitive, but that's Microsoft for you.
  • Correction, us "3DFace" for the background and "None" for the border.
  • Kevin,

    Then what is the best way to make the SRP Splitter control invisible when we are using the SRP Tab control to draw the background?
  • Set the Background to "None". In fact, that should work in both cases.
  • That was my original assumption (thus is why I was asking Colin the same thing) but when I have the SRP Tab control being used with AllowXPTheme turned on I get the following:

    The splitter is very wide to make it easy to spot.
  • Don,

    Can you make sure Frameworks' promoted events logic isn't interfering in some way? When I create a form in a clean copy of OI and set the Background property to None in the form designer, I do not get this issue.
  • Kevin,

    I just did this in SYSPROG to avoid all FrameWorks/Promoted Event interference and get the same results as above. I hate to ask this question, but did you test this on your end with the SRP Tab control set to a negative height (like -6) and with the AllowXPTheme property set to 1? I am also testing this in OI 9.3.2, FWIW.
  • Don,

    Yes. I'm setting AllowXPTheme to 1 during the CREATE event. Height is set to -2. Tab control is the first in the tab order. My test is in OI 9.2.0.
  • Kevin,

    Okay, we will have to compare systems in a team meeting because I still cannot get it to work the same way as you.
  • Hi Guys, interesting to watch your thread.
    This is a good reason to use this wiki, so others can see the reasoning.

    I was using 2.0.0, so downloaded 2.0.1 and re-registered.
    I get the same.
    I changed the background to 3DFace, and this is now the same as the Window, so that one is now fine.
    The border still shows however, with None.

    Changing the properties on the Form Designer, OLE properties, changes the actual visual effects, ie with no code involved.
    The None border still remains.

    FWIW : I dont use promoted events, never figured out how to use them.

  • Colin,

    Agreed on the purpose for discussing these issues on the wiki. Glad you recognize that.

    Would you be willing to post a screen shot of what this looks like on your end? It might help us to understand what is happening with you a little better.

  • Also, try setting the Border to None in the Form Designer and see if that works. It'll be interesting to see if there is a difference.
  • I tried the Border properties in the code initially, and in the form designer properties only later to test the other types of border.

    I will make up a screen shot and post shortly.
  • Splitter image attached, with code on screen.
    I changed the gripper to 0 so you can see that the code has been run, not shown in the edit box code

  • Colin,

    By any chance do you have the Border checkbox in the control properties window checked?
  • Arghh!!!
    Yes, I did, and turning it off resolved it.
    How did I miss that?
    I guess seeing a border property made me think that was the thing to use, not thinking OI also has a border on the OLE control.

    Works fine now, thanks for the effort.
    I have 2 splitters on my screen already, and need to have another 2 in a panel on the left, and making them all visible would make the screen a mess, so making some invisible allows the functionality, without the clutter of the controls.

    I will send a screen shot shortly via Email so you can see.

  • Colin,

    I can see how that got confusing. FWIW, I often use the border checkbox myself for OLE controls that do not display any UI during design time. Otherwise it is hard to visually place the control on the form.

    I look forward to seeing a screen shot of the final product.
Sign In or Register to comment.