4D Blog

Home Product Flash news about 4D Write Pro and anchored images

Flash news about 4D Write Pro and anchored images

July 30, 2018

Product

Flash news: 4D Write Pro anchored images now support 4D Expressions!

Since 4D v16 R6, it’s been possible to add anchored images to 4D Write Pro documents. Once inserted, these images were static, either defined with a picture variable (or field), or by a picture path. Today, you have more flexibility: a valid 4D expression can also be associated to an anchored picture!

Imagine you have a background picture in your document … with a time stamp, a graphical status, a product illustration, and more. The question to ask is: “How can I make this background dynamic or context-dependent?”

Easy! Just set the new “wk image expression” attribute for any anchored image to define a method that returns a picture!

4D Write Pro: Anchored pictures expressions

code example

// First, create a picture inside your document
$obImage:=WP Add picture(myDoc)
// Set the expression
WP SET ATTRIBUTES($obImage;wk image expression;"TimestampPicture(0)")
// Then decorate as you want!
WP SET ATTRIBUTES
($obImage;wk anchor origin;wk paper box)
WP SET ATTRIBUTES($obImage;wk anchor horizontal align;wk right)
WP SET ATTRIBUTES($obImage;wk anchor vertical align;wk top)

Note: Previously created 4D Write documents with the same kind of images can be imported as well, but make sure to “allow” the methods invoked in the imported document using the SET ALLOWED METHODS command.

Discuss

Tags 4D Write Pro, Pictures, Programming, v17 R2, v18, Word processor

Latest related posts

  • November 14, 2025

    Event Report in 4D Qodly Pro: See Every Interactions at a Glance

  • November 14, 2025

    4D Qodly Pro: Page Zoom Controls

  • November 13, 2025

    macOS Tahoe, Windows 11, which operating systems for 4D 20 and 21?

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
  • AI
  • 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 AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming 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