Page 1 of 2

HMG 2.5.5

Posted: Mon Aug 11, 2008 5:44 pm
by Roberto Lopez
- Harbour MiniGUI 2.5.5 Changelog:

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 {'Im0.bmp','Im1.bmp','Im2.Bmp','Im3.Bmp' }
END COMBOBOX

* Adding an item with 'Im3.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 { 'Im0.bmp','Im1.bmp','Im2.Bmp','Im3.Bmp' }
END COMBOBOX

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

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

Más Ejemplos: \hmg\samples\combo_5

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 6:02 pm
by esgici
Perfect ! :D ( as always ;) )

Thanks a lot Roberto

Best regards

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 6:11 pm
by Roberto Lopez
esgici wrote:Perfect ! :D ( as always ;) )
Thanks a lot Roberto
No... not perfect at all... perhaps... just good :)

Anyway... wel will wait for bug reports... this was a very 'complicated' release (many many changes).

Regards,

Roberto.

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 7:36 pm
by Rathinagiri
Thanks Roberto.

New features make HMG more powerful.

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 8:21 pm
by esgici
Roberto Lopez wrote:... will wait for bug reports...
Tested ... as far as possible.

How I can find a thing nonexistent :)

Thanks again.

Best regards

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 8:43 pm
by Roberto Lopez
esgici wrote:
Roberto Lopez wrote:... will wait for bug reports...
Tested ... as far as possible.
How I can find a thing nonexistent :)
You must be patient :)

Regards,

Roberto.

Re: HMG 2.5.5

Posted: Mon Aug 11, 2008 8:51 pm
by esgici
Roberto Lopez wrote:
You must be patient :)
Yes, you are right ( again, as always :) )

Best Regards

Re: HMG 2.5.5

Posted: Tue Aug 12, 2008 4:32 pm
by gfilatov
Roberto Lopez wrote: Anyway... wel will wait for bug reports... this was a very 'complicated' release (many many changes).
Roberto,

Bugreport for HMG 2.5.5 Image ComboBox on Win98SE:

Excuse me but a new Image ComboBox is not work at Win98 (a such control is not displayed). :(
The ComboBox control without an Image clause still works OK.
:roll:

Re: HMG 2.5.5

Posted: Tue Aug 12, 2008 4:38 pm
by Roberto Lopez
gfilatov wrote:
Roberto Lopez wrote: Anyway... wel will wait for bug reports... this was a very 'complicated' release (many many changes).
Roberto,

Bugreport for HMG 2.5.5 Image ComboBox on Win98SE:

Excuse me but a new Image ComboBox is not work at Win98 (a such control is not displayed). :(
The ComboBox control without an Image clause still works OK.
:roll:
Thanks for the report.

I've tested on XP and Vista only. I have not Win9x machines near to me. I'll install one in a VM as soon as possible.

Maybe I must take a look at WinApi docs for WIn9x compatibility issues too.
Do you know if a special care must be taken under Win9x for COmboEx?... It could save to me a lot of time.

Thanks again.

Roberto.

Re: HMG 2.5.5

Posted: Tue Aug 12, 2008 4:52 pm
by Roberto Lopez
gfilatov wrote: Excuse me but a new Image ComboBox is not work at Win98 (a such control is not displayed). :(
The ComboBox control without an Image clause still works OK.
:roll:
Please try removing comment slashes '//' in the lines 195 and 196 of c_combo.c file.

Regards,

Roberto.