Resizer : The best resizing solution!

So you have written that new, must have program. Let us see it here.
Post Reply
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Resizer : The best resizing solution!

Post by Cedron »

Resizer-0.0.4.tar.gz
(12.95 KiB) Downloaded 381 times
Fixed version (use this one):
Resizer-0.0.5.tar.gz
(12.98 KiB) Downloaded 382 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.
Last edited by Cedron on Sunday 5th July 2020 2:19pm, edited 1 time in total.
.... and carry a big stick!
User avatar
PJBlack
Posts: 184
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Resizer : The best resizing solution!

Post by PJBlack »

Works smoothly ...

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

Thanks Ced
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Resizer : The best resizing solution!

Post 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.
.... and carry a big stick!
User avatar
Quincunxian
Posts: 171
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Resizer : The best resizing solution!

Post by Quincunxian »

You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False
Cheers - Quin.
I code therefore I am
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Resizer : The best resizing solution!

Post 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.
.... and carry a big stick!
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Resizer : The best resizing solution!

Post 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.
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Resizer : The best resizing solution!

Post 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
.... and carry a big stick!
User avatar
Technopeasant
Posts: 140
Joined: Saturday 13th July 2019 6:50pm
Location: Stony Plain, Alberta, Canada
Contact:

Re: Resizer : The best resizing solution!

Post 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.
Technical director,
Piga Software
http://icculus.org/piga/
Post Reply