[Lazarus] Form size locked

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Sep 15 16:20:07 CEST 2013


On Sun, 15 Sep 2013 13:17:42 +0000
Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:

> It appears that a bsDialog form has its actual width and height locked 
> once it has been displayed by ShowModal. Components inside the form, 
> e.g. a PageControl with client alignment, see the dimensions that have 
> been set under program control but the actual form size can be 
> significantly different (larger or smaller).
> 
> What I've got is a form that displays either a single page if the 
> program is doing a simple login to a host computer, or multiple pages if 
> it's also offering facilities that the host can use; in the case of the 
> single page the pagecontrol tabs are disabled and the overall form 
> shrunk to fit. The first time the form is displayed it's always sized 
> correctly, but if the required login type changes the form size cannot 
> be adjusted.
> 
> I'm able to use this sort of thing as a workaround:
> 
> BorderStyle := bsSizeable;
> Application.ProcessMessages;
>          Width := Tag div 1000;
>          Height := Tag mod 1000;
> Application.ProcessMessages;
> BorderStyle := bsDialog;
> Application.ProcessMessages;
>          PageControl1.ShowTabs := true;
>          PageControl1.ActivePage := TabSheet1;
> 
> Gtk2, Lazarus 1.0, LCL 1.0.1.3.

Please create a bug report with a complete example.

Mattias
 




More information about the Lazarus mailing list