4D Blog

Home Product Customize App Appearance with New Windows Types

Customize App Appearance with New Windows Types

May 6, 2024

Product

With 4D 20 R5, unlocking new possibilities in application customization, two additional window types now offer flexible modal or non-modal windows without title bars. This means complete freedom to tailor your application’s appearance to your exact specifications. Imagine redesigning the title bar to match your desired aesthetics, integrating features like a customized search box or other elements seamlessly.

But that’s not all! We’ve also introduced several new commands designed to streamline your development process:

  • Reduce a window in the title bar on Windows or the dock on macOS,
  • Know if the window is reduced in the title bar on Windows or the dock on macOS,
  • Know if the window if the window is maximized.

HDI: Improve Form

New window types

Two new constants can be used with the Open form window command.

$winRef1:=Open form window("myForm1"; Plain form window no title)
$winRef2:=Open form window("myForm2"; Movable form dialog box no title)

Form without title bar, with a "Hello World!" static text and a "OK" button

Here is an example with a custom title bar:

  • A rectangle with the automatic background color. So on macOS, in light mode, the rectangle is white, and in dark mode, the rectangle is black.
  • An invisible button above the rectangle. On click, the button triggers the DRAG WINDOW command, enabling the window to be moved.
  • Three buttons, Close, Maximize, and Minimize with associated commands MAXIMIZE WINDOW, MINIMIZE WINDOW, and REDUCE RESTORE WINDOW. As for the look of the buttons, a little more work for macOS, rollover is performed on all three buttons simultaneously. So, on the On Mouse enter and On Mouse Leave events, the button icons are modified with the OBJECT SET FORMAT command.

 

On macOS:

Plain form window no title

Plain form window with a custom title bar that contains "close", "minimize" maximize" buttons and a search area.

Movable form dialog box no title

Modal dialog with a custom title bar that contains "close", "minimize", "maximize" and "help"buttons

On WindowS:

Plain form window no title

blank

Movable form dialog box no title

blank

 

This example in live:

New commands

In addition to these new window types, we have also introduced some handy commands to simplify your development process:

  • The REDUCE RESTORE WINDOW allows you to reduce the frontmost window or the named window in the taskbar on Windows in SDI mode or the dock on macOS. If the window is reduced, the command restores it to its previous state.

REDUCE RESTORE WINDOW($winRef)

  • The Is window reduced command helps you determine if a window is currently in the reduced state. This knowledge can be leveraged to perform specific actions based on the window’s state.

If(Is window reduced($winRef))
  // Do something
End if

  • The Is window maximized command lets you know if the window is in the maximized state, so you can easily switch between the maximized and previous states.

If(Is window maximized($winRef))
  MINIMUM WINDOW($winRef)
Else
  MAXIMIZE WINDOW($winRef)
End if

And…

Please refer to this documentation page for more information on the different window types. Don’t hesitate to share the incredible interfaces you’ve created with this feature on the 4D Forum.

Discuss

Tags 20 R5, 21, Form object, Programming, UI

Latest related posts

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

  • April 29, 2025

    Discover your AI-powered writing assistant in 4D Write Pro

Vanessa Talbot
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.
  • 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 Google Listbox Logs Mail 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 Google Listbox Logs Mail 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