KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Building Interactive Graphic Interfaces with 4D Draw, Part IV: A Color Palette D
PRODUCT: 4D Draw | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: January 1, 2000
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

This is the fourth part of a technical note series about creating interactive graphic interfaces with 4D Draw.
Part IV explains the workings of a different 4D Draw interactive graphic interface: the "Color Palette" page of the "BMP Picture Properties" window in the example database. It features a 4D Draw area displaying the color palette of a BMP picture. This color palette interface is constructed with a separate object for each color in the palette. The user can click on one of the objects, and the color’s specifications are displayed on the form. The user can also click on a pixel in the BMP picture shown on the form, and the pixel’s color is highlighted in the color palette display, and the color’s specifications are shown on the form. This technical note answers questions such as:

-How can you programmatically construct a diagram of the color palette in a 4D Draw area?

-How can your code detect which object was clicked in a 4D Draw area?

-How can you indicate the selected status of an object in a 4D Draw area, without showing selection handles?

-How can you highlight multiple objects in a 4D Draw area?

-When the user clicks on a picture variable, how can your code detect which one of the picture’s pixels was clicked?

Other parts in this series will continue explaining the example database’s code, and describe techniques you can use to build interactive graphic interfaces with 4D Draw.

Download Complete Tech Note and Example: Windows | Mac