Avoid window resizing

26 views
Skip to first unread message

Antonio F.S.

unread,
Aug 1, 2022, 12:49:33 PMAug 1
to The Ring Programming Language

Hello.

How do I prevent the window from resizing?

Thank you.
Antonio F.S.

Ilir

unread,
Aug 1, 2022, 2:10:55 PMAug 1
to The Ring Programming Language
Hello,

inside the View

class myView from WindowsViewParent
   win = new MainWindow() {
           ...
           setFixedSize(width(),height())

Antonio F.S.

unread,
Aug 1, 2022, 3:23:33 PMAug 1
to ring...@googlegroups.com

Hello.

When working with the form designer, it creates two files: the controller and the view. The view file cannot be modified because when the form is executed, everything that has been added, modified or removed disappears; that is to say, its configuration is automatic and comes from the properties chosen in the designer itself. The logical thing would be that, like other existing options, there would be one more that activates or deactivates the resizing of the window.

Antonio F.S.

-----------------------------------------------

El 1/8/22 a las 20:10, Ilir escribió:
--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/a386fa9a-af21-4cf5-a3f6-cd4b3022a610n%40googlegroups.com.

Ilir

unread,
Aug 1, 2022, 4:32:58 PMAug 1
to The Ring Programming Language
Hello,

you have three options (or more, never restrict yourself)

1. Add settSizeFixed at the end of the development cycle because it is needed only at production stage
2. Move setSizeFixed to controller (assuming only view changes)
3. Move setSizeFixed to class extending controller (if it changes too)

Antonio F.S.

unread,
Aug 1, 2022, 5:14:10 PMAug 1
to ring...@googlegroups.com

Hello,

Indeed and by logic, I have moved the sentence to the controller file and it has worked perfectly, as it is not modified by the form designer. :-)

Thank you very much.
Best regards.
Antonio F.S.

----------------------------------------------

El 1/8/22 a las 22:32, Ilir escribió:

Bert Mariani

unread,
Aug 1, 2022, 6:59:23 PMAug 1
to The Ring Programming Language
Hello Antonio

Please post your ENTIRE CODE as an attachment so we can follow what you are trying to do.

Antonio F.S.

unread,
Aug 2, 2022, 5:02:23 AMAug 2
to ring...@googlegroups.com

Hello.

What I'm trying to do is to learn Ring. :-) And every time I come across a problem that, having investigated it before, I can't solve, then I bring it up to the group. The last one was to disable the possibility to resize a window and, after several attempts, Ilir's suggestions were essential to solve the issue.
I think it would be good to add such a possibility (for the next revision of Ring) to the properties in the form designer because, with a simple click, everything would have been much easier in this case.

Best regards.
Antonio F.S.

----------------------------------------------------------

El 2/8/22 a las 0:59, Bert Mariani escribió:

Antonio F.S.

unread,
Aug 2, 2022, 5:07:06 AMAug 2
to ring...@googlegroups.com

Hello.

Please find attached my tests about what I discussed in my previous email.

Kind regards.
Antonio F.S.

------------------------------------------------------------

El 2/8/22 a las 11:02, Antonio F.S. escribió:
RingTests.zip

Ilir

unread,
Aug 2, 2022, 5:23:01 AMAug 2
to The Ring Programming Language
Hello,

there is a  Qt_MSWindowsFixedSizeDialogHint, but not existing in Ring:

Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.

This should be combined with setFixedSize I think.  

Reply all
Reply to author
Forward
0 new messages