Nested Splitters.

Components on the Raize Panels palette: panels, group bars, page controls, splitters, toolbars, status bars, group boxes, etc.

Nested Splitters.

Postby SteveG » Sat Mar 31, 2018 5:35 pm

Hi Ray,

Here's a strange one.

* I have a TRzSplitter inside the right pane of another TRzSplitter.
* The splitter that contains the other one is set to horizontal while the contained splitter is set to vertical.
* The positions of both splitter bars is being saved on application close and loaded on application start.
* The "container" splitter bar is being restored correctly.
* The "contained" splitter bar reverts back to the design-time position.

I can't seem to set its position via code using the Position property. However, the other splitter bars work fine. I eventually tried using the Percent property and that works correctly.

It gets more interesting because the code that saves and restores the splitter bar positions hasn't been changed for years but now it suddenly stops working correctly for just one splitter. I suspect it's some sort of corruption of the form or perhaps RAD Studio (rather than a problem with TRzSplitter) but I haven't been able to find anything.

I deleted all of the dcus and recompiled. I set the form to view as text and then back to view as form but that didn't correct it either.

This is with RAD Studio XE7 Professional (Delphi personality). I haven't tried it with Tokyo 10.2 yet as I still have to purchase later versions of some other components before I can compile.

Anyway, I'd wondered if you had came across this weird behaviour before.

Regards,

Steve
SteveG
 
Posts: 31
Joined:
Wed Aug 10, 2011 11:41 pm
Location: Canberra, Australia

Re: Nested Splitters.

Postby Raize Support » Sat Mar 31, 2018 9:47 pm

Interesting indeed. The positioning of the splitter bar is dependent on the size of the splitter itself. That is, you cannot set the splitter position to be beyond the bounds of the splitter. This can come into play during streaming if the parent window is getting resized during load.

I have used the same arrangement that you are describing quite frequently, including in the CodeSite Viewers, and have never run into this particular behavior.

Are you able to duplicate the issue in a new test project? If so, please send the source code (no executables) to support@raize.com and I can take a look. If not, then I suspect that you have other code or event handlers that are affecting the behavior.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Nested Splitters.

Postby SteveG » Thu Apr 19, 2018 12:53 am

Sorry Ray, I haven't been able to get around to creating a project that reproduces the issue. I ended up loading and saving the Percent property instead of the Position property and that's working fine with the existing code.

Regards,

Steve
SteveG
 
Posts: 31
Joined:
Wed Aug 10, 2011 11:41 pm
Location: Canberra, Australia


Return to Panels

Who is online

Users browsing this forum: No registered users and 1 guest

cron