Forum > General
Problem resizing Form with Splitter [BUG][WORKAROUND]
Vodnik:
Attached is a very simple project: a Form with 2 Memos and a Splitter.
I followed this example: http://wiki.freepascal.org/TSplitter#Splitter_with_AnchorSides
Memo1 is anchored at top, left and bottom to a Form, at right - to Splitter.
Memo2 is anchored at top, right and bottom to a Form, at left - to Splitter.
Both Memos have Costraints.MinHeight and MinWidth, also do Form.
All align properties are set to alNone.
How to reproduce a problem:
Start application
Enlarge the form's width well enough
Using Splitter, minimize Memo1 to the possible minimum width
(up to now everything works fine)
Now drag right frame of a form to minimize the width.
Memo2 with Splitter starts to overlap Memo1.
I can't believe that this is a bug which nobody have noticed.
That's why I played few days with this issue to find out what I'm doing wrong.
Creating different projects with similar settings, I noticed that effect have random nature:
Sometimes Memo1 is overlapped by Splitter and Memo2,
Sometimes Splitter with Memo2 are dragged under Memo1 which looks transparent in that case.
Seems this depends upon the order of settings were done while designing the form and the controls, but I didn't find out the rule.
Lazarus 1.8.4
Windows 7
Handoko:
When starting to run your source code, I got SIGSEGV error. So I tried to run it directly from the binary, I got the error as the image below.
Please fix the error first. Or write another simple demo that showing your 'real' issue.
I wrote a simple desktop tool for my friend, it uses a TSplitter. So far, no any issue found. So I'm interested to know more about the problem you said.
Josh:
Same here
Data file is not in project, I commented out all the formshow event code.
To me its working fine.
Noy sure how you write the config file for the form data, but the form show that reads and set the values can be called many times. Try putting a breakpoint in the start of the event and see if that the problem.
Handoko:
I tested OP's code again but with both OnFormShow and OnFormClose disabled. I cannot reproduce the issue OP said. Tested on Lazarus 1.8.4 Ubuntu 18.10 GTK 2.
Vodnik:
I apologize for providing wrong example :-[
I have replaced archive in original message for true one.
Probably this problem takes place only under Windows.
I have tested under Windows 7, Windows Server 2012 - effect was the same.
Navigation
[0] Message Index
[#] Next page