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

Splitter issue

Resizing my splitter has an issue with the width changing.
Could well be my code, but I have two versions of my application with different SRP controls, and one works and the other not.

The one that works is 4.0.3.RC25
The one that fails is 4.1.0.RC2

What is the proper latest version, web site says 4.0.3, so presume this is correct, but just checking.

Colin

Comments

  • Yes, 4.0.3 is still the latest official release. Can you explain a little more about the issue you are seeing? I use the splitter bar frequently and have not noticed any problems. Also, are you absolutely sure you don't have an auto-size checkbox ticked in the OLE control property dialog?
  • I have Autosize check box ON for height only, not width.
    I will reinstate V4.0.3 and see if that resolves.

    The issue is as I resize the form vertically, the splitter gets narrower by 1 pixel until invisible.
    It still could well be in my code, I have copied the code from version A to B but B still exhibits the issue... but it could be elsewhere still, so I am not pointing to the SRP control just yet.
  • If you find the problem reoccur with the 4.1.0 RC2 control, you can try the 4.1.0 RC12 control from this link. What you are describing now sounds a little familiar to me, but it may have been for something else. Keep us posted and we'll see what we can do.
  • I reinstated V4.03 and get the same.
    The issue is definitely relate to the AutoSize height check box, even though I am only changing the left/right size properties.
    Resizing the form vertically with AutoSize height ON, causes the control to migrate right in my code as it seems to get a mismatch in the X position somehow.

    I also added code
    If SplitSize<3><5 THEN SplitSize<3>=5
    To ensure the splitter remains visible.

    In addition if I try to manually set the Size<4> property to the window size<4> it also makes things move.
    Very strange indeed.
    I am still investigating.

    Colin
  • Tried 4.1.0.RC12, the same behaviour happening with Autosize Height ON.
    Plus it moans about my licence, so I reinstated 4.0.3 and all is well, except the splitter issue remains.
    I will look to a workaround in the meantime.
  • FWIW, the code below is on my SIZE event


    SIZE:
    IF NOT(ASSIGNED(WinSize)) THEN WinSize=""

    NewSize=Get_Property(@WINDOW,"SIZE")
    IF NewSize<3>=WinSize<3> and NewSize<4>=WinSize<4> THEN
    WinSize =Get_Property(@WINDOW,"SIZE")
    END ELSE
    WinSize =Get_Property(@WINDOW,"SIZE")
    SplitSize=Get_Property(@WINDOW:".SPLITTER","SIZE")
    FromSize =Get_Property(@WINDOW:".FROM_TABLE","SIZE")
    CurrSize =Get_Property(CurrCtrl,"SIZE")

    IF SplitSize<3><5 THEN SplitSize<3>=5
    Call Set_Property(@WINDOW:".SPLITTER","SIZE",SplitSize)

    FromSize<3>=SplitSize<1>-10
    * Call Set_Property(@WINDOW:".FROM_TABLE","SIZE",FromSize)

    CurrSize<1>=SplitSize<1>+10
    CurrSize<3>=WinSize<3>-SplitSize<1>-35
    Call Set_Property(CurrCtrl,"SIZE",CurrSize)

    Size=GET_PROPERTY(@WINDOW:".CURR_LABEL","SIZE")
    Size<1>=SplitSize<1>+10
    Call Set_Property(@WINDOW:".CURR_LABEL","SIZE",Size)

    Size=GET_PROPERTY(@WINDOW:".CURR_PROJECT","SIZE")
    Size<1>=SplitSize<1>+100
    Call Set_Property(@WINDOW:".CURR_PROJECT","SIZE",Size)
    End
    RETURN
  • Is there an OI border on the splitter bar?
  • THAT IS IT
    Turned off the OI Border, and use the SRP control border property and all works fine with AutoSize height ON.
    Thanks Mark
  • Great catch Mark. I think that is what I recall being an issue I experienced. IIRC, it will occur with other controls as well.
  • I had it with other controls some time ago but it took a while for me to remember "what was that checkbox again?"
Sign In or Register to comment.