Page 1 of 1

Resizer : The best resizing solution!

Posted: Thursday 18th June 2020 8:05pm
by Cedron
Resizer-0.0.4.tar.gz
(12.95 KiB) Downloaded 405 times
Fixed version (use this one):
Resizer-0.0.5.tar.gz
(12.98 KiB) Downloaded 401 times
Well, IMO.

This falls under the category "Why didn't I think of this earlier?"

To use this, simply import the ResizerClass.class file from the attached test project, insert a few lines in your main form (and any other container), and boom, instantly you get:

* Proportional resizing

* Double click toggling of all Tooltips

The best part is, you can retrofit this into existing non-resizable projects without having to change the existing code, just add a class and a few lines of code.

Re: Resizer : The best resizing solution!

Posted: Thursday 18th June 2020 10:08pm
by PJBlack
Works smoothly ...

Not sure in which case to use but ... I will find out :)

Thanks Ced

Re: Resizer : The best resizing solution!

Posted: Friday 19th June 2020 2:50pm
by Cedron
Form resizing has been one of those thorny issues that is inherent with desktop applications of different resolutions and sizes. The Gambas solution of using expandable controls, containers, and springs, to make the form resizable is quite cumbersome. I'm sure it gets easier as you practice (right Cogier?), but it still a lot of extra work and clutter. The resizing is not proportional, it is according to the arrangements.

This method lets you define what your form will look like. From then on, you don't have to do any extra work and the form can be resized or maximized and it always looks (roughly) the same.

Tooltips are extraordinaryly helpful when you want to find out what something does. But when you already know, they can be an annoying distraction. Being able to easily turn them on or off on the fly is a huge feature for me. That it comes along "for free" is even better.

Re: Resizer : The best resizing solution!

Posted: Friday 19th June 2020 10:47pm
by Quincunxian
You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False

Re: Resizer : The best resizing solution!

Posted: Friday 19th June 2020 10:56pm
by Cedron
Quincunxian wrote: Friday 19th June 2020 10:47pm You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False
I did not know that. Thanks.

Now I'm contemplating gutting that part of the code. Would "RestoreToOriginal" ever be needed? Those calls are easily left out so there isn't really a penalty to keeping the routines.

Switching subtopic: There is a little trouble with the container approach and TabPanels. I found a workaround though and will post more details with the new version of my music player.

Re: Resizer : The best resizing solution!

Posted: Sunday 21st June 2020 2:54am
by cage
Just tried out your system on a few of my programs and it is really easy now to make expanding windows. Great work and a really big thanks for that code.

Re: Resizer : The best resizing solution!

Posted: Sunday 5th July 2020 2:21pm
by Cedron
Thanks cage,

I'm finding it really useful as well. I like the WYSIWYG quality of the design process. However, Cogier found a slight problem in the code. The upgraded version is attached in my original post at the beginning of this thread.

Ced

Re: Resizer : The best resizing solution!

Posted: Thursday 9th July 2020 11:47pm
by Technopeasant
For the most part in my programs, I only resize the view-port and keep the sizes of the controls constant. I suppose this makes more sense in a game context than an application one though.