TForm AutoScroll When BorderStyle bsNone Not Working
Original Reporter info from Mantis: mtrsoft
-
Reporter name: John Raycheba
Original Reporter info from Mantis: mtrsoft
- Reporter name: John Raycheba
Description:
The basic problem is that if a TForm or a descendent has a BorderStyle of bsNone the scrollbars will not appear or work.
This applies to Lazarus 1.8.4, 2.0.0 and 2.0.2 on a Windows 7 /32 system.
This differs from the behaviour of Delphi. (tested with Delphi 2007 to XE2)
The fix for this is:
In file C:\Lazarus\LCL\include\CustomForm.inc (at line 18 or so) change
BorderStylesAllowAutoScroll = [bsSizeable, bsSizeToolWin];
to
BorderStylesAllowAutoScroll = [bsNone, bsSizeable, bsSizeToolWin];
THE USE CASE:
In some programs that I am porting from Delphi to Lazarus I have the following situation:
-
A TTabSheet descendant (TFormSheet) which hosts (is owner & parent of) a TForm or TForm deescendant.
-
The TForm must have a BorderStyle of bsNone so that it appears without borders in the TFormSheet.
-
The TFormSheet is then programmatically added to a TPageControl.
The reason for doing the above is so that TForms and descendants can be individually visually designed and can be used on any number of different pagecontrols.
Mantis conversion info:
- Mantis ID: 35407
- OS: Windows
- OS Build: 7, 10
- Platform: Windows
- Version: 2.0.2