Monday, August 11, 2008

- Harbour MiniGUI 2.5.5:


English:

- New: 'DroppedWidth' property for ComboBox control. This property
is used to set the dropdown list width in a combobox control.
'DroppedWidth' can't be less that ComboBox width. Sanples:
\hmg\samples\combo_5.

- New: 'OnDropDown' event for ComboBox control. OnDropDown Event
will be executed when the user attempts to open combo's dropdown
list. Sanples: \hmg\samples\combo_5.

- New: 'OnCloseUp' event for ComboBox control. It will be executed
when the user closes the dropdown list. Sanples:
\hmg\samples\combo_5.

- Fixed: Selected item is correctly preserved for Combobox using
'ItemSource' property after refresh.

- New: 'Image' property for ComboBox cpntrol.

'Image' Property specify a character array containing image file
names or resource names.

When you add an item, must specify the image array index number
(zero based) and the text associated with it.

When adding items at startup you must to use a two dimensional array.
This array must have one row for each combo item and two columns.
The first column must contain the image index and the second the
text for the item.

When using the additem or Item properties you must use a single array
containing two elements. The first, the image index item and the
second, the text for the item.

When you retrieve the item, using the 'item' property, it will
return a two elwments array containing the image index and the text
of the item.

When 'Image' and 'ItemSource' properties are used simultaneously,
'ItemSource' must be specified as a list containing two field names.
The first, the image index for the items, the second, the item text.

'Sort' and 'Image' can't be used simultaneously.

Sample:

DEFINE COMBOBOX Combo1
ROW 10
COL 250
ITEMSOURCE CIDADES->CODIGO , CIDADES->DESCRICAO
VALUE 2
WIDTH 200
HEIGHT 100
IMAGE { 'Img0.bmp','Img1.bmp','Img2.Bmp','Img3.Bmp' }
DROPPEDWIDTH 350
ONDROPDOWN PlayBeep()
ONCLOSEUP PlayAsterisk()
END COMBOBOX

<...>

aItems := {}

aadd ( aItems , { 2 , 'Item 01' } )
aadd ( aItems , { 0 , 'Item 02' } )
aadd ( aItems , { 3 , 'Item 03' } )
aadd ( aItems , { 1 , 'Item 04' } )

DEFINE COMBOBOX Combo2
ROW 10
COL 10
WIDTH 100
ITEMS aItems
VALUE 1
IMAGE { 'Img0.bmp','Img1.bmp','Img2.Bmp','Img3.Bmp' }
END COMBOBOX

* Adding an item with 'Img3.bmp' and the text 'Hello!'

Win1.Combo2.AddItem( { 3 , 'Hello!' } )


More Sanples: \hmg\samples\combo_5


Español:

- Nuevo: Propiedad 'DroppedWidth' para el control ComboBox.
Esta propiedad permite establecer el ancho de la lista desplegable.
'DroppedWidth' no puede ser menor al ancho del control.
Ejemplos: \hmg\samples\combo_5.

- Nuevo: Evento 'OnDropDown' para el control ComboBox.
Este evento será ejecutado cuando el usuario abra la
lista desplegable. Ejemplos: \hmg\samples\combo_5.

- Nuevo: Evento 'OnCloseUp' para el control ComboBox.
Se ejecutará cuando el usuario cierre la lista desplegable. Ejemplos:
\hmg\samples\combo_5.

- Solucionado: El item seleccionado es correctamente preservado
luego de un 'refresh' en el control ComboBox que use la propiedad
'ItemSource'.

- Nuevo: Propiedad 'Image' para el control COmboBox.

La propiedad 'Image' se usa para especificar un array conteniendo
los nombres de archivos de imagen (o recursos) que se quiera asociar
al control.

Al agregar un item, debe especificarse el número de índice de la
imagen (basado en cero) y el texto asociados al mismo.

Al agregar items en la definición del control, debe usarse un array
de dos dimensiones (una fila por cada item y dos columnas).
La primera columna debe contener el número de índice de la imagen
(posiciónen el array de imágenes definido mediante la propiedad
'image') y la segunda columna debe contener el texto asociado al
item.

Cuando se agregan items usando el método 'AddItem' debe usarse un
array de dos elementos: El primero, el índice de la imagen y el
segundo el texto asociado al item.

Al leer el contenido de un item por medio de la propiedad 'item'
se obtendrá un array de dos elementos, según se describió en el
punto anterior.

Cuando las propuiedades 'Image' e 'ItemSource' se usan
simultáneamente, 'ItemSource' debe especificarse como una lista
conteniendo dos nombres de campo, correspondiendo al indice de la
imagen y al texto de cada item, respectivamente.

Las propiedades 'Sort' e 'Image' no pueden usarse simultáneamente.

Ejemplo:

DEFINE COMBOBOX Combo1
ROW 10
COL 250
ITEMSOURCE CIDADES->CODIGO , CIDADES->DESCRICAO
VALUE 2
WIDTH 200
HEIGHT 100
IMAGE { 'Img1.bmp','Img2.bmp','Img3.Bmp','Img4.Bmp' }
DROPPEDWIDTH 350
ONDROPDOWN PlayBeep()
ONCLOSEUP PlayAsterisk()
END COMBOBOX

<...>

aItems := {}

aadd ( aItems , { 2 , 'Item 01' } )
aadd ( aItems , { 0 , 'Item 02' } )
aadd ( aItems , { 3 , 'Item 03' } )
aadd ( aItems , { 1 , 'Item 04' } )

DEFINE COMBOBOX Combo2
ROW 10
COL 10
WIDTH 100
ITEMS aItems
VALUE 1
IMAGE { 'Img0.bmp','Img1.bmp','Img2.Bmp','Img3.Bmp' }
END COMBOBOX

* Agregando una item con la imagen 'Img3.bmp' y el texto
* 'Hello!'

Win1.Combo2.AddItem( { 3 , 'Hello!' } )

Más Ejemplos: \hmg\samples\combo_5