4D Blog

Home Product 4D Write Pro: Say hello to table headers

4D Write Pro: Say hello to table headers

April 28, 2022

Product

Tables are an essential part of 4D Write Pro. They evolve regularly by offering new presentation options. For example, a table can be displayed on several columns or pages. The table headers are repeated at the top of each column or page to make it easier for the user to read.

Starting with 4D v19 R5, the table can be enhanced with headers.

Define headers in 4D Write Pro tables

Tables and contents

When we think of tables, we often have a list in mind. Whether it’s people, products, or whatever, the first row is usually used to display a label corresponding to the content of the columns. 

Headers ON EACH PAGE… or column.

When tables contain a large number of rows, automatic column or page breaks occur. In this case, it’s usually convenient to reproduce the header line at the top of each new page. Of course, this is also worth doing when a page is split into two or more columns.

Basically, you want this!

This functionality is now available in a straightforward way. You can define for a given table how many header rows it has.

WP SET ATTRIBUTES($table;wk row header count;5) // New!!!

Of course, you can also read this attribute.

WP GET ATTRIBUTES($table;wk row header count;$headerRows) // New!!!

Standard action

A standard action shall be available to define which row(s) should be used as a header. Just put the cursor inside the table, and select the proper value (0 to 5), that’s it!

The standard action “table/headerRowCount” is available as a menu…

blank

or as a simple drop-downblank

Where are my header rows?

Once the header rows have been set or if the document has been imported, you may want to get the table’s header row range in order to set up a specific style for these rows, right? Let’s say you’d like a white title on a navy blue background.

The WP Table get rows command has been updated, and you can now use the constant wk header rows to get the header rows!

$range:=WP Table get rows($table; wk header rows)  // *** NEW *** !
WP SET ATTRIBUTES($range; wk text color; "white"; wk background color; "navy")

blank

4D Write Pro Interface Widgets

The Table Property menu includes the new item: “Number of header rows” in the sidebar or toolbar widget.

blank

Don’t forget the source code of the 4D Write Pro interface is available on GitHub. Feel free to adapt it to your needs!

Conclusion

This feature brings another useful table display option, available either by programming or through the provided interface.

This feature makes it easier to design 4D Write Pro documents with tables filled with data from your database. More functionalities integrating ORDA will come in the future. Stay tuned!

Discuss

Tags 4D Write Pro, Table, UI, v19 R5, v20, Word processor

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