Resize / AutoAdjust()

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Resize / AutoAdjust()

Post by Claudio Ricardo »

Hi...
Encontré otro problemita: al redimensionar achicando la ventana, las columnas del control browse se achican más de lo necesario (no conservan la proporción), y al agrandar la ventana, las columnas no se ensanchan.
Como los botones tienen imagenes, éstas no se redimensionan (un condicional para que cambie los iconos lo resolveria)
Pero donde más utilidad tiene esta función es en los controles browse y grid.

English by Google Trad
I found another little problem: when resizing by making the window smaller, the columns in the browse control get smaller than necessary (they don't keep the aspect ratio), and when enlarging the window, the columns are not widened.
As the buttons have images, they are not resized (a conditional to change the icons would solve it)
But where this function is most useful is in the browse and grid controls.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Resize / AutoAdjust()

Post by AUGE_OHR »

hi,
Claudio Ricardo wrote: Thu Feb 18, 2021 6:48 pm I found another little problem: when resizing by making the window smaller, the columns in the browse control get smaller than necessary (they don't keep the aspect ratio), and when enlarging the window, the columns are not widened.
it "calculate" Width of Column on "Original Width" at create

Code: Select all

    DEFINE BROWSE Browse_1
        ...
        WIDTHS {100,100,40,40,40,200}
which is in _HMG_SYSDATA[6,k,j]
Claudio Ricardo wrote: Thu Feb 18, 2021 6:48 pm As the buttons have images, they are not resized (a conditional to change the icons would solve it)
But where this function is most useful is in the browse and grid controls.
hm ... change Size of Image

Label, Hyperlink and Toolbar have AUTOSIZE but other Image must create a "new" Image and use BT_DrawDCtoDC()
viewtopic.php?f=5&t=6744&p=64808
have fun
Jimmy
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Resize / AutoAdjust()

Post by Claudio Ricardo »

Hi...
A picture is worth a thousand words.
Maybe it's because i use wind*ws (seven home premium sp1 x64) in VirtualBox ?
Button's don't matter for me.

Normal size:
Screenshot_20210218_225736.png
Screenshot_20210218_225736.png (42.76 KiB) Viewed 1196 times
I resize at aprox 50%:
Screenshot_20210218_225935.png
Screenshot_20210218_225935.png (26.28 KiB) Viewed 1196 times
When i resize to approximately original size:
Screenshot_20210218_230055.png
Screenshot_20210218_230055.png (37.16 KiB) Viewed 1196 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Resize / AutoAdjust()

Post by AUGE_OHR »

hi,

"how" do you "resize" ?

i agree it may fail when resize to smaller value than Original.
it does not happens when Maximize / Normalize

---

you can try "autosize" when use -1 as Column Width

Code: Select all

 LISTVIEW_SETCOLUMNWIDTH( hGrid, j - 1, - 1 )
have fun
Jimmy
Post Reply