Page 1 of 2
[Module] ResizeExModule.pbi (all OS)
Posted: Tue Mar 12, 2019 7:53 pm
by Thorsten1867
Extended Resize - Module (All OS)
- Store & restore window size, position and state
- Automatic size adjustment for gadgets [#MoveX|#MoveY|#Width|#Height]
- Automatic horizontal & vertical centering [#HCenter/#VCenter]
- Proportional size adjustment in percent [#HFactor/#VFactor]
- Support of containers
- Automatic size adjustment for a defined ListIcon column
Code: Select all
; Window::Free() - Delete all data
; Window::RestoreData() - Restore position, size and state of the window
; Window::StoreData() - Store position, size and state of the window
; Window::Save() - Save data off all windows
; Window::Load() - Load data off all windows
; Resize::AddContainer() - Add container for automatic size adjustment of the contained gadgets
; Resize::AddWindow() - Add window for automatic resizing
; Resize::AddGadget() - Add gadget for automatic resizing
; Resize::Free() - Delete all data
; Resize::RemoveContainer() - Remove all resize data for this container
; Resize::RemoveGadget() - Stop resizing gadget and remove resize data
; Resize::RemoveWindow() - Remove all resize data for this window (-> CloseWindow)
; Resize::RestoreWindow() - Restore original window & gadgets size
; Resize::SelectWindow() - Select a previously added window
; Resize::SetFactor() - Set the factor for the movement and size adjustment (Default: 100%)
; Resize::SetListColumn() - Define ListIcon column for automatic resizing
Download: ResizeExModule.pbi
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Mar 13, 2019 5:51 am
by Cyllceaux
This is great
DPI-Compatible: off
DPI-Compatible: on

And this is
not resizable.
After remove line 457 and DPI-Compatible: on
Code: Select all
WindowBounds(#Window, 250, 200, #PB_Ignore, #PB_Ignore)

Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Mar 13, 2019 6:06 am
by Cyllceaux
Oh.. Btw... How about Container?
I mean, sometimes the parent is a container, not a window.
Or a Canvas (#PB_Canvas_Container), or a Panel, or a container in a Splitter.
It's not always the best choice to use a Window as a parent.
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Mar 13, 2019 8:49 am
by forumuser
So is this finally a fully dpi-aware solution to resize a window with all its gadgets?
Would it be possible to add a min / max value for a window (so that the resize handler
doesn't make it smaller than these numbers)?
Regarding the saving of window data (to make it more readable), could you
add #PB_JSON_PrettyPrint to the SaveJSON() command?
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Mar 13, 2019 9:51 am
by Kwai chang caine
Usefull module, works fine here
Thanks for sharing

Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Mar 13, 2019 5:21 pm
by Thorsten1867
Update:
- Bugfixes
- Support of containers
- Automatic size adjustment for a defined ListIcon column
- minimum and maximum window size
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Wed Aug 07, 2019 12:45 pm
by jacky
Is it possible to add e.g. a list icon gadget, that is still dpi aware
but doesn't get moved or resized? E.g. I'd like to add one in a
form gadget on the left side and it should stay on that position
and should not get resized when the window is enlarged or
reduced...
Thanks,
Jacky
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Sat Aug 10, 2019 12:13 pm
by jacky
Not possible?
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Sat Aug 10, 2019 12:30 pm
by Bisonte
jacky wrote:Is it possible to add e.g. a list icon gadget, that is still dpi aware
but doesn't get moved or resized? E.g. I'd like to add one in a
form gadget on the left side and it should stay on that position
and should not get resized when the window is enlarged or
reduced...
Thanks,
Jacky
Why you want to add it, if you don't want to resize it ???
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Sat Aug 10, 2019 1:17 pm
by jacky
Because I need a fixed size element in the upper left part of the window
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Tue Sep 03, 2019 11:30 am
by Thorsten1867
With the support of Walbus I could integrate dynamic gadget texts, i.e. with the gadget size now the text size can be adjusted automatically.
Update:
- Added: Resize gadget text (dynamic text/font)
- Added: _CloseWindowHandler()
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Tue Nov 19, 2019 1:12 pm
by camille
Hello,
I'd like to ask if something like this is possible with ResizeEx?
https://imgur.com/a/Pz5EMuT
The "Profiles and sections overview" frame should only resize horizontally.
The drop-down in it should not be resized horizontally (because it
would look dumb if the text is relatively short and its drop-down is
getting wider and wider).
The listview and the buttons on the right side should grow / shrink
together with the frame they're living in.
The "Section properties" frame should resize both horizontally and vertically.
It consists of logical groups (left, middle and right).
The left one should not grow / shrink at all,
the middle one should only do it vertically,
the right one (drop-down + listview underneath it) should be resized with
the size of the belonging frame -> horizontally and vertically).
The buttons at the bottom of the frame should stay centered and resize
horizontally...
Thanks,
Camille
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Tue Nov 19, 2019 2:35 pm
by Thorsten1867
camille wrote:Hello,
I'd like to ask if something like this is possible with ResizeEx?
https://imgur.com/a/Pz5EMuT
The "Profiles and sections overview" frame should only resize horizontally.
The drop-down in it should not be resized horizontally (because it
would look dumb if the text is relatively short and its drop-down is
getting wider and wider).
The listview and the buttons on the right side should grow / shrink
together with the frame they're living in.
The "Section properties" frame should resize both horizontally and vertically.
It consists of logical groups (left, middle and right).
The left one should not grow / shrink at all,
the middle one should only do it vertically,
the right one (drop-down + listview underneath it) should be resized with
the size of the belonging frame -> horizontally and vertically).
The buttons at the bottom of the frame should stay centered and resize
horizontally...
Thanks,
Camille
Code: Select all
Resize::AddGadget(#Frame1, Resize::#Width)
Resize::AddGadget(#ListView, Resize::#Width)
Resize::AddGadget(#Button, Resize::#MoveX)
Resize::AddGadget(#Frame2, Resize::#Width|Resize::#Height)
......
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Tue Nov 19, 2019 3:49 pm
by camille
Thank you, Thorsten1867!
But the thing that I don't understand is, how would I register e.g.
the first combobox in the first frame in your module?
It shouldn't move when the window is resized, and it shouldn't
be made smaller or larger as well. I see no flag value that I can
use to achieve this behavior...
Re: [Module] ResizeExModule.pbi (all OS)
Posted: Tue Nov 19, 2019 4:39 pm
by Thorsten1867
camille wrote:Thank you, Thorsten1867!
But the thing that I don't understand is, how would I register e.g.
the first combobox in the first frame in your module?
It shouldn't move when the window is resized, and it shouldn't
be made smaller or larger as well. I see no flag value that I can
use to achieve this behavior...
You don't have to do anything. Only gadgets that are moved or enlarged need to be registered.