[Gambas-user] window resize help

Bruce Steers bsteers4 at gmail.com
Tue Dec 20 22:09:22 CET 2022


On Tue, 20 Dec 2022 at 20:54, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 20/12/2022 à 21:27, Bruce Steers a écrit :
> >
> >
> > On Tue, 20 Dec 2022 at 18:38, Benoit Minisini
> > <benoit.minisini at gambas-basic.org
> > <mailto:benoit.minisini at gambas-basic.org>> wrote:
> >
> >     Le 20/12/2022 à 19:06, Benoit Minisini a écrit :
> >      > Le 20/12/2022 à 18:00, Bruce Steers a écrit :
> >      >> Could you check this out Ben as it might be a gambas bug.
> >      >>
> >      >> the basic code for the left edge movement is thus...
> >      >>
> >      >> Dim hRect As New Rect(Me.ScreenX, Me.ScreenY, Me.W, Me.H)
> >      >> hRect.Left = Mouse.ScreenX
> >      >> Me.Move(hRect.X, hRect.Y, hRect.W, hRect.H)
> >      >>
> >      >> Now apparently that should not move the right window edge but it
> >     does
> >      >> somewhat randomly jiggle it about.
> >      >> Is it a bug or is there something i need to account for?
> >      >>
> >      >> Many thanks
> >      >> BruceS
> >      >>
> >      >
> >      > Before looking at anything, I can tell you that resizing a window
> >     behind
> >      > the window manager
> >
> >     --> I mean by following the mouse.
> >
> >     --
> >     Benoît Minisini.
> >
> >
> > Do you mean only a window with a proper window manager titlebar/border
> > should be resized by mouse?
> > That's terrible.
> > The routines i made very nearly works perfectly.
>
> I mean that if you want to resize a window with the mouse, you must ask
> kindly the window manager so that it deals with the process by itself.
>
> See https://doc.qt.io/qt-5/qwindow.html#startSystemResize for example.
>
> Regards,
>
> --
> Benoît Minisini.
>

Aah i see, so I guess gambas is not set up to use it at all for a
borderless window?

Or can we access the "kind" startSystemResize function in gambas any way to
do it ourselves?

I've often wanted a borderless but resizable window. usually i have added
an option to show the titlebar/border to resize then hide it again but it's
ugly.

The routine i have made needs a little refinement but it's working now in a
way i'm happy with so I guess i can just adapt it into my programs.

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221220/47386f39/attachment.htm>


More information about the User mailing list