Resizer : The best resizing solution!
Resizer : The best resizing solution!
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!
Re: Resizer : The best resizing solution!
Works smoothly ...
Not sure in which case to use but ... I will find out
Thanks Ced
Not sure in which case to use but ... I will find out
Thanks Ced
Re: Resizer : The best resizing solution!
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.
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!
- Quincunxian
- Posts: 173
- Joined: Sunday 25th June 2017 12:14am
- Location: Western Australia
Re: Resizer : The best resizing solution!
You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False
Application.ShowTooltips = False
Cheers - Quin.
I code therefore I am
I code therefore I am
Re: Resizer : The best resizing solution!
I did not know that. Thanks.Quincunxian wrote: ↑Friday 19th June 2020 10:47pm You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False
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!
Re: Resizer : The best resizing solution!
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!
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
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!
- Technopeasant
- Posts: 144
- Joined: Saturday 13th July 2019 6:50pm
- Location: Stony Plain, Alberta, Canada
- Contact:
Re: Resizer : The best resizing solution!
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.