KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Customizing 4D Write Pro Widgets Tabs
PRODUCT: 4D Write Pro | VERSION: 18 R | PLATFORM: Mac & Win
Published On: February 17, 2021

A new feature introduced in 4Dv18R5 is the ability to specify which tabs are visible in the 4D Write Pro widgets and how they are ordered. This is performed programatically with the new component method WP ShowTabPages. The method takes in two parameters, the name of the WP widget and a collection of the names of the tabs in the desired order.

The toolbar style widget has the following tabs in the following order:

  • "Home"
  • "Insert"
  • "Margins"
  • "Borders"
  • "Images"
  • "Printing"
  • "Tables"
  • "Spell"
  • "Protection"
  • "ImportExport"
The sidebars widget has the following tabs in the following order:
  • "Fonts"
  • "Alignments"
  • "Tabulations"
  • "Frames"
  • "Sizes"
  • "Backgrounds"
  • "Expressions"
  • "Bookmarks"
  • "Stylesheets"
  • "Tables"
  • "Protection"
  • "ImportExport"
Below is an example code to modify the tabs of a toolbar style widget:
$tabs:=New collection("ImportExport"; "Home"; "Spell")
WP ShowTabPages("WPtoolbar"; $tabs)