[Gambas-user] Size of Window cannot be decreased when opened with ShowModal()

Bruce Steers bsteers4 at gmail.com
Sun Jan 28 18:27:20 CET 2024


Thats how modal windows work.

the way around it is to set a small (minimum) size in the IDE then grow it
by code before opening.

the modal window will not shrink below the size it is set in the ide. but
if grown by code it can then shrink to the IDE set size from there.

So make the window say 100x100 in the IDE and in it's Form_Open method put

Me.Resize(300,300)
you should then be able to shrink it to 100x100 if required

BruceS


On Sun, 28 Jan 2024 at 17:03, Hans Lehmann <hans at gambas-buch.de> wrote:

> Hello.
>
> When I open an ordinary resizeable help window with the Show() method its
> size can be increased and decreased with the mouse - as expected. But when
> I open the same window with the ShowModal() method its size can only be
> increased (not decrease).
>
> Is this a bug?
>
> A minimum demo-snippet is attached.
>
> Gambas  versions: 3.18.4 and up-to-date master
>
> OS: Mint 20.1/20.3 Cinnamon and Mint 20.3 Mate.
>
> Regards
>
> Hans
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240128/220fbd92/attachment-0001.htm>


More information about the User mailing list