Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Shell size constraints
Shell size constraints [message #1849524] Sun, 23 January 2022 11:57
Eclipse UserFriend
Hi,

I'm looking for a way to allow the user to resize a shell window with some constraints, for example, limit the size so it can contain an integer number of cells of a fixed size. If the cell is 10x20 pixels the user can resize to 100x200 pixels (contains 10x10 cells) but if the user resize to say 105x200 it should automatically resize to 100x200, same for the vertical size.

So far I have used a control listener to calculate the nearest size and re-set the shell size to it. It sort of works on Windows, on Linux it works with some quirks, don't know if it works on Mac.

I was wondering if there is a better, compatible, way to do something like that ?
Any example that I can look at ?

Thanks for any suggestion.

Best regards,
Marco
Previous Topic:Changes in look and feel following migration from GTK1 to GTK3
Next Topic:SWT Browser and TLS 1.3
Goto Forum:
  


Current Time: Sat Jul 05 09:35:24 EDT 2025

Powered by FUDForum. Page generated in 0.10708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top