COMBOBOX

Syntax

ctl[n]: COMBOBOX(Class Specific Properties), Other Properties

Description

Comboboxes are good for drop-down lists, also known as "pull-down menus". The items in the listbox are specified in the Text string, separated with the new-line escape sequence (\n). Each item has a unique integer value, starting at 0 and increasing.

Class Specific Properties

DISABLENOSCROLL
Used in conjunction with HSCROLL or VSCROLL; if the item amount is less than needed to require scrolling, the scrollbar is disabled (instead of it being removed).
EXTENDEDUI
List drops down when right and down arrow keys are pressed. By default, arrow keys select the next item without dropping down the list.
INTEGRALHEIGHT
The height of the listbox is resized according to the items' height. (default)
LOWERCASE
Items in the combobox are displayed in lowercase characters.
NOINTEGRALHEIGHT
The height of the listbox is resized according to the Size property, even if items are partially displayed.
SORT
Sorts the items in alphabetical order. The values of the items are recomputed - the top item is always 0 and continues with 1, 2, etc.
UPPERCASE
Items in the combobox are displayed in uppercase characters.
VSCROLL
If necessary, a vertical scrollbar is activated.

Other Properties

Text
Defines the combobox's text contents. (default = no text)
Val
Assigns a value to the combobox and activates the item. (default = -1)

Example

ctl[0]: COMBOBOX(VSCROLL, DISABLENOSCROLL), Text="U.S.A.\nGermany\nRussia\nBrazil\nSpain\nEgypt", Val=1, Size=(*,60)

COMBOBOX usage example

%ffp

ctl[0]: COMBOBOX(VSCROLL), "Algorithm 1\nAlgorithm 2\nAlgorithm 3\nAlgorithm 4",
Val=0, Size=(130,60), Action=PREVIEW

ForEveryTile:
{

	for (y=y_start; y<y_end; y++)          //Loop through all rows
	{
		for (x=x_start; x<x_end; x++) //Loop through all columns
		{
		        switch (ctl(0))
			{
			case 0: //Algorithm 1
			... Your code
			break;
	
			case 1: //Algorithm 2
			... Your code
			break;
						
			case 2: //Algorithm 3
			... Your code
			break;
					
			case 3: //Algorithm 4
			... Your code
			break;
			}
		} 
	} 
return true; //Tile has been completely processed
}

Notes

When using the INTEGRALHEIGHT and Size=(x,y) properties, the y value refers to the height of the list displayed after the combobox is clicked. The height is automatically rounded-off to display a whole number of textlines. You cannot extend the height of the combobox beyond the length of the combobox list (FilterMeister will round down values that are too high). This behaviour can be overridden using the NOINTEGRALHEIGHT property.

Also see

LISTBOX

Comments

Everyone can add their comments about their experiences with this function here. Tips for using it are welcome, too.