Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
How to add text to the button 
As you can see on the image below you have the possibility to enter at the same time up to 9 different texts over the button surface, each with its own fonts, settings and colors. 
 
The simplest way to put text over the button is to use the Caption property which displays the text horizontally and vertically centered. 
When the caption text is too long to fit horizontally in the button area (determined by the surrounding rectangle) it will wraps automatically: to force the caption text to wrap differently, use the CaptionWordWrapPerc property. 
Further texts can be applied over the button surface using the abmSetTextOnPos and abmGetTextOnPos functions to set/retrieve the text and using the abmSetTextSettingOnPos and abmGetTextSettingOnPos functions to set/retrieve every text settings stored inside the TEXT_DESC data structure.  
If you need to change all of the buttons text settings inside a container at once, you can use the abmContainerTextSetting
In case you should manage UNICODE strings of text, you can predispose the SDK to receive them in the right format using the abmUseUnicodeStrings function. 
The font used to render these texts can be set/retrieved using the abmSetFontText and abmGetFontText functions. 
If you need to change all of the buttons font settings inside a container at once, you can use the abmContainerFontSetting
If the user needs to hide some of these texts it is possible to use the abmSetTextVisible function. 
Use the following properties to change the button caption text colors:  
  • ForeColor property to change the color of the button's caption text.  
  • ForeColorMouseOver property to change the color of the button's caption text when the mouse is over the button area.  
  • ForeColorPressed property to change the color of the button's caption text when the button is pressed.  
  • ForeColorDisabled property to change the color of the button's caption text when the button is disabled.  
  •  
    NOTE: starting from version 3 of the SDK, you can add further texts through the use of "cells": see the How to manage cells section for details. 
     
     
     
     
     
     
     
    Copyright © 2002-2009 MultiMedia Soft 
    Return to index