4D Blog

Home Product Add an icon to listbox header

Add an icon to listbox header

July 19, 2016

Product

From 4D v15 R5, you can add an icon in the listbox header by programming. The image can come from a file, a picture variable or the picture library. This icon can be placed on the left or on the right side of the column.

Since you can replace the icon programmatically, you can display your own customized order arrows, an icon based on of the displayed content, or using SVG, even dynamically created images, such as the number of unread emails.

extract_hdi

We have adapted the two following commands:

  • OBJECT Get format ( { * ;} object )
  • OBJECT SET FORMAT ( { * ;} object ; displayFormat )

To format a list box header, in the “displayFormat” parameter, pass a character string respecting the following syntax “picture;iconPos” where:

  • picture: Picture linked to a header that comes from a picture library or a picture variable:If the picture comes from a picture library, enter its number, preceded by a question mark (e.g.: “?250”).If the picture comes from a picture variable, enter the variable name.If the picture comes from a file stored in the Resources folder of the database, enter a URL of the type “#{folder/}picturename” or “file:{folder/}picturename”.
  • iconPos: position of the icon. Two values are possible: iconPos = 1 meaning Left or iconPos = 2 meaning Right

Example Database

For more details, please take a look at the 4D v15 R5 upgrade manual.

Discuss

Tags Listbox, Programming, UI, v15 R5, v16

Latest related posts

  • April 29, 2025

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

  • April 28, 2025

    Unlock the Power of AI with 4D AIKit: Automate, Create, and Innovate

  • April 25, 2025

    Formulas in Label Wizard

Caroline Briaud
Caroline Briaud
• 4D Product Team Leader •Caroline joined 4D SAS in July, 2013 as an Engineering Manager responsible for new features definition. Caroline helped the Engineering team to put in place the R-release concept, with the new development process definition and its application within 4D’s engineering teams.Caroline is now leading the 4D Product team, mainly made up of Product Owners which are representing the customers within Engineering.Caroline started her career as a software developer in the mobile phone industry. She specialized in program management with an American company in an international context spread across US, India and China.
  • 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