KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to dynamically change the picture ID in a Picture Popup Menu
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: January 30, 2007
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

You can change the picture ID in a Picture Popup Menu by choosing "variable" as the source in the object property list and then using the SET FORMAT command to set the ID for the variable name for the pop-up object name.

To format Picture Popup Menus, in the displayFormat parameter to the SET FORMAT command, pass a character string respecting the following syntax:

cols;lines;picture;hMargin;vMargin;flags

• cols = number of columns in the picture.

• lines = number of lines in the picture.

• picture = picture used, coming from the picture library, a picture variable or a PICT resource:

  - if the picture comes from the 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 PICT resource, enter its number, preceded by a colon (e.g.: ":62500")

• hMargin = margin in pixels between the horizontal limits of the menu and the picture.

• vMargin = margin in pixels between the vertical limits of the menu and the picture.

• flags = transparency mode of picture pop-up menu. Accepts the values 0 and 64:

  - mode = 0: the picture pop-up menu is not transparent,
  - mode = 64: the picture pop-up menu is transparent.

Documentation doe the SET FORMAT command:
http://www.4d.com/docs/CMU/CMU00236.HTM