Page 1 of 2
Resize / AutoAdjust()
Posted: Tue Feb 16, 2021 8:38 pm
by AUGE_OHR
hi,
i have work with AutoAdjust(), made by MigSoft / Danny / Pablo César, to resize Controls and add
LockWindowUpdate()
https://docs.microsoft.com/en-us/window ... ndowupdate
LISTVIEW_SETCOLUMNWIDTH()
https://docs.microsoft.com/en-us/window ... olumnwidth
LockWindowUpdate() does "speed-up Output"
LISTVIEW_SETCOLUMNWIDTH() is used for Column of GRID / BROWSE.
---
to enable Resize / AutoAdjust() add this to Form
Code: Select all
ON SIZE AutoAdjust( ThisWindow.Name )
ON MAXIMIZE AutoAdjust( ThisWindow.Name )
Re: Resize / AutoAdjust()
Posted: Wed Feb 17, 2021 8:07 pm
by Claudio Ricardo
Hi Jimmy...
I make small demo prog... I need copy dll.ch from HB contrib to HMG Include folder
and comment or modify some lines for error when compilating or execute.
Now if i resize first, resize and maximize work fine... but not if i first maximize.
What i do bad ?
Sorry for my very bad english

and Thanks in advance.
Re: Resize / AutoAdjust()
Posted: Wed Feb 17, 2021 10:56 pm
by mol
The problem with this autosizing is that generates strange screens, eg. when you change width - fontsize stays the same, but when you change height of window - fontsize is changing.
In my opinion - fontsize od controls should stay unchanged, size of pictures and icons also. Only dimensions of some cotrols - like browse or grid should change
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 2:15 am
by Claudio Ricardo
Hi Marek...
(Google trad)
I think the same as you, but the bug in the little program that I uploaded is surely due to my error.
I am now with very little free time to review or better implement it.
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 8:23 am
by serge_girard
Risize should work as good as it works in any browser (Ctrl + and Ctrl -). This means that EVERY control has to be resized....!
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 11:05 am
by AUGE_OHR
hi,
i have found c:\hmg.3.4.4\SAMPLES\Basics\MAIN_AUTOADJUST\AutoAdjust.prg and try it in my last App.
with some modification ( Font ) it seems to work fine ... but not with all App.
it seems to work fine when use *.FMG or "single-Form" but i have Problem when open "Child Form" on "Parent Form"
it might be a Problem of Semi-OOP vs. "real" OOP as it recognize "Child Form Control" just "One-Way" (minimize)
---
when "resize" it use "Zoom-Scale" on Control which work with ROW, COL, WIDTH, HEIGHT.
but with Font it might give Result of Size which does not exist so OS take "near by Font Size"
but i "think" we need to resize Font while it look funny when have "big" Control with "small" Font
---
i´m not sure about _HMG_SYSDATA. will it have "Original" Value or can this be changed
my own Code use "Original" Value and "Zoom-Scale"
---
never less LockWindowUpdate() and LISTVIEW_SETCOLUMNWIDTH() seems to work find
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 1:42 pm
by AUGE_OHR
hi Claudio,
Claudio Ricardo wrote: ↑Wed Feb 17, 2021 8:07 pm
Now if i resize first, resize and maximize work fine... but not if i first maximize.
What i do bad ?
i have look into your Sample using Debugger and "think" i found it
your Intro have 2 Button but 2nd Button have a Image and no Text -> no Font -> Error resize
i "think" that is the reason why "Font resize" was not in Original at that place which i use now
i have to overthink about Image
if you want to try "more" use "Original" Source
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 3:19 pm
by Claudio Ricardo
Hola... Sólo tiene tu función en la ventana "Proveedores".
Hi... Only "Proveedores" window have you autosize function.
Probaré poniendole texto a los 3 botones de esa ventana y usando tu código original.
I try put text in the 3 button's on that window and you original code.
Thanks for your explanation.
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 3:50 pm
by AUGE_OHR
hi,
my Error
i forgot to post this line
Code: Select all
ON INIT AutoAdjust( ThisWindow.Name )
to get Original Size / Pos

- OnInit_Adjust.JPG (49.87 KiB) Viewed 1915 times
so it are 3 line to change
---
Font "Problem" when have a Image but no Text : use ELSEIF code which do not resize Font as i post it
Re: Resize / AutoAdjust()
Posted: Thu Feb 18, 2021 6:04 pm
by Claudio Ricardo
Yess!!! Work fine now !!
Thank you so much !!!