NiGui icon indicating copy to clipboard operation
NiGui copied to clipboard

Make window not resizable

Open kzerot opened this issue 4 years ago • 2 comments

Hi! Sometimes you need make not resizable window. So far I haven't found such feature in NiGui, am I wrong?

kzerot avatar Jan 14 '21 07:01 kzerot

I saw in the code that there were an event that is triggered when the window get resized, so you could use that to detect when the window get resized and resize it back

I found that method handleResizeEvent*(window: Window, event: ResizeEvent) {.base.} maybe It can help for now

0x4c756e61 avatar Apr 16 '21 11:04 0x4c756e61

Something like this should work

window.handleResizeEvent = proc(event: ResizeEvent) = 
    window.width = 600.scaleToDpi
    window.height = 400.scaleToDpi

0x4c756e61 avatar Apr 22 '21 09:04 0x4c756e61