In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TCombobox redifinition

Xailer professional forum in English
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

TCombobox redifinition

Mensaje por Oleg »

Hello!
I want to make Value property in TCombobox class which have the same value
as nIndex property.
I did it like this:
--------
#include "Xailer.ch"
CLASS TCOMBOBOX FROM XCOMBOBOX
PROTECTED:
METHOD SetValue(nVal)
PUBLISHED:
DATA bBlock
DATA xEmpty
PROPERTY Value INIT 0 READ ::nIndex WRITE ::SetValue( nVal )
ENDCLASS
METHOD SetValue( nVal ) CLASS TCombobox
::nIndex:=nVal
RETURN Nil
--------
but when I try to access Value property it is not found (error).
Can I achieve this?
If I use PROPERTY clause without READ/WRITE (PROPERTY Value INIT 0) it
works.
Thank you.
Oleg.
Responder