Resizer : The best resizing solution!

Post

Posted
Rating:
#1 (In Topic #423)
Avatar
Regular
Cedron is in the usergroup ‘Regular’
Attachment

Fixed version (use this one):

Attachment

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.

.... and carry a big stick!
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Enthusiast
PJBlack is in the usergroup ‘Enthusiast’
Works smoothly …

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

Thanks Ced
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
Cedron is in the usergroup ‘Regular’
 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!
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
Quincunxian is in the usergroup ‘Blogger’
 You can also stop tool tips displaying without clearing them by setting:
Application.ShowTooltips = False

Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Regular
Cedron is in the usergroup ‘Regular’

Quincunxian said

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!
Online now: No Back to the top

Post

Posted
Rating:
#6
Regular
cage is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Regular
Cedron is in the usergroup ‘Regular’
 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!
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Regular
Technopeasant is in the usergroup ‘Regular’
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.
Online now: No Back to the top
1 guest and 0 members have just viewed this.