BorderStyle = bsNone is ignored when a form is shown by ShowModal
Original Reporter info from Mantis: peterT
-
Reporter name: Peter Tomcsányi
Original Reporter info from Mantis: peterT
- Reporter name: Peter Tomcsányi
Description:
When I create a form Form2 and in the IDE I set:
BorderStyle = bsNone
BorderIcons = []
Then if I show the form by
Form2.ShowModal
It still has the border and caption.
This seems to happen only with qt and only with ShowModal.
gtk2 shows Form2 correctly with ShowModal and qt shows the form correctly if Show is used instead of ShowModal (but only until no ShowModal is called for that Form).
I am attaching my small project.
See "Steps To Reproduce" for more details.
Steps to reproduce:
Compile and run the project (qt+Linux, but maybe the same will happen with qt+win).
-
Push the button "Form2.Show" - Form2 is shown without border (= correctly as designed) and Form1 still works (can be activated etc.) as usually.
-
Close Form2 using its "Close" button
-
Push the button "Form2.ShowModal" - Form2 will be shown with border (= incorrectly). Form1 is disabled (which is correct).
-
Close Form2 using its "Cancel" button (but the same happens if you use the "Close" button)
-
Push again button "Form2.Show" - Form2 will be shown with border (= incorrectly) and Form1 is disabled (which is incorrect). So it is in fact show as if ShowModal was called, but Cancel does not work (only Close).
Additional information:
Setting BorderStyle inside Form2.OnShow does not help either.