Recent

Author Topic: FORM1 not resizable  (Read 595 times)

Nera

  • Full Member
  • ***
  • Posts: 103
FORM1 not resizable
« on: February 18, 2020, 03:53:15 pm »
Good morning everyone.
I would like to make my FORM1 not resizable. How can I do this?

Thanks.

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: FORM1 not resizable
« Reply #1 on: February 18, 2020, 04:10:10 pm »
Set the form's property BorderStyle := bsDialog;

Nera

  • Full Member
  • ***
  • Posts: 103
Re: FORM1 not resizable
« Reply #2 on: February 18, 2020, 04:26:04 pm »
Set the form's property BorderStyle := bsDialog;


Very good.
 thanks.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: FORM1 not resizable
« Reply #3 on: February 18, 2020, 06:24:16 pm »
Any of these border styles will produce a "non user-resizable" form: bsNone, bsSingle, bsDialog, bsToolWindow. The differences between them are basically the presence or not of border/non-client area (bsNone vs. the rest) and the width and font size of the default non-client area (for all but bsNone).

From the help for TFormBorderStyle (somewhat edited):
Code: Pascal  [Select][+][-]
  1. type TFormBorderStyle = (
  2.   bsNone,       {No border at all.}
  3.   bsSingle,     {Standard border, the form cannot be resized.}
  4.   bsSizeable,   {The form can be resized (standard).}
  5.   bsDialog,     {The form is a dialog, cannot be resized.}
  6.   bsToolWindow, {Standard border, small caption, not resizeable.}
  7.   bsSizeToolWin {Small caption, form can be resized.}
  8. );
« Last Edit: February 18, 2020, 06:29:49 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018