4D Blog

Home Product On resize… On resize… On resize…

On resize… On resize… On resize…

November 29, 2019

Product
Uncategorized

Wondering how to create a nice and dynamic user interface? Typically when a form is resized, the form objects whose horizontal sizing or vertical sizing properties are set to move or grow, are automatically resized. In some cases  (e.g., finer user interface management), developers choose to manage form object size and position by programming. To do so, they check the “on resized” event which is triggered within the form method. But what happens when the form contains one or more subforms? On many levels? This blog post gives you the answers!

subforms and sub-subforms and…

Managing subform objects when a “parent” subform object is resized might seem complicated, but it’s not! It can be done either using the Execute method in subform command or by modifying the associated value of the subform object, followed – inside the subform- by managing the generated on bound variable change event.

Starting with 4D v18, it’s even simpler! You can directly manage the on resize event in the subform method! Much more convenient, logical, and easy! This event will be triggered each time the size of the subform object is modified in the main form. This may happen when:

  • the main form is resized (as well as the subform object). This is the most obvious case.
  • a splitter modifies the height or the width of the subform object. Not quite as obvious, but worth mentioning.
  • a subform object’s size is modified by programming using the OBJECT SET COORDINATES command. This case is even less obvious, don’t forget it 🙂

Conclusion

If you already manage these kinds of scenarios in your application, you may consider simplifying your code (Or not! “If it ain’t broke, don’t fix it”). But for future developments, you’ll appreciate this simplification of event management!

 

 

Discuss

Tags Programming, Subform, User Experience, v18

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Roland Lannuzel
Roland Lannuzel
• Product Owner & 4D Expert •After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy