Recent

Author Topic: Best way to resize a window ?  (Read 3763 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 1672
    • miXimum is the DJ's best friend
Best way to resize a window ?
« on: June 25, 2012, 04:35:14 pm »
Hello every Lazarus fans  :P

In a last topic, KpComp shows us how to move a panel.  ::)

Because Lazarus do not offer a resizable window without top panel tray ( borderstyle := bsnone do not give a resizable window, and all the other style are with top panel tray), i want to create my own sizable window.

For that i use a window borderstyle := bsnone and top, bottom, left and right thin panels with cursor := crSizeNS for top/bottom panels and cursor := crSizeWE for left/right panels.

The goal is to resize the window with panelmousedown on one of 4 resizing-panels and panelmousemove  :-\

See attachment from original project of KpjComP

PS : Other ideas are welcome  ;)
« Last Edit: June 25, 2012, 04:46:37 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Best way to resize a window ?
« Reply #1 on: June 25, 2012, 06:10:12 pm »
It's not too much different to the moving panel.

Try this ->

I've also added a few other types of resize / moving too.

Fred vS

  • Hero Member
  • *****
  • Posts: 1672
    • miXimum is the DJ's best friend
Re: Best way to resize a window ?
« Reply #2 on: June 25, 2012, 09:30:40 pm »
@ KpjComp : Superb and you give me the moving windows for bonus, many, many thanks.  :P

Im happy.  :)

I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs