Hola a todos,
Estoy tratando de cambiar el color de fondo y la letra de un TextBox en tiempo de ejecución, el control tiene la propiedad "ReadOnly .T." y no lo logro.
Code: Select all
CASE nOpcion = 6
ColorGets := aColorSelect
Colores.TextBox_3.ReadOnly := .F.
* Colores.TextBox_3.DisabledFontColor := aColorSelect
SetProperty ( 'Colores' , 'TextBox_3' , 'DisabledFontColor' , aColorSelect )
Colores.TextBox_3.ReadOnly := .T.
Actualiza()
CASE nOpcion = 7
ColorGets := aColorSelect
Colores.TextBox_3.ReadOnly := .F.
SetProperty ( 'Colores' , 'TextBox_3' , 'DisabledBackColor' , aColorSelect )
Colores.TextBox_3.ReadOnly := .T.
Actualiza()
Tambien observo que si utilizo la sentencia:
Code: Select all
Colores.TextBox_3.DisabledFontColor := aColorSelect
Me da el siguiente error:
Code: Select all
Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/
C:\hmg.3.3.1\Mios\Colores\Main.Prg(1148) Error E0030 Syntax error "syntax error at '.'"
1 error
Tambien observo que el textbox en su información de control tiene:
DEFINE TEXTBOX <Controlname>
READONLY <lValue>
DISABLEDBACKCOLOR <aDisabledBackColor>
DISABLEDFONTCOLOR <aDisabledFontColor>
END TEXTBOX
y que sus propiedades tiene:
Code: Select all
- FontColor
- DisabledBackColor
- DisabledFontColor
- CaretPos
- ReadOnly
- Name (R)
- TabStop (D)
- Field (D)
- Parent (D)
- InputMask (D)
- Format (D)
- MaxLength (D)
- RightAlign (D)
- HelpId (D)
- CaseConvert (D)
- DataType (D)
Las cuales: ReadOnly, DisabledBackColor y DisabledFontColor se pueden cambiar en tiempo de ejecución y no lo hace.
Tambien observo que la documentación para ReadOnly no es clara, solo tiene:
Lo cual intuyo yo que debería ser:
Code: Select all
Syntax:
ReadOnly <lValue> (Control Definition)
<WindowName>.<ControlName>.ReadOnly := lValue
<WindowName>.<ControlName>.ReadOnly --> lValue
This should be specified as a three element numeric array containing red, green and blue components.
Y también la propiedad: DisabledBackColor tiene el mismo problema.
Code: Select all
Syntax:
DisabledBackColor <anColor>
Must be specified as a three elements numeric array containing red, green and blue components
Se que es mucho trabajo, es un trabajo gigante, pero creo en mi humilde opinión,
se debería avanzar concluyendo con cosas solidas, ya que me desanimo en seguir mi proyecto teniendo tantos tropiezos, yo creo que ya no deberían de existir estas cosas sin resolver o solo a mi me pasa?, acabo de revisar máquina, volvi a cargar HMG y último parche y todo igual.
Saludos
P.D.: Y no lo digo solo por mi, sino por todos los que empezamos con HMG.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
Hello everyone,
I'm trying to change the background color and font of a TextBox at run time, the control has the property "ReadOnly .T." and I fail.
Code: Select all
CASE nOpcion = 6
ColorGets: = aColorSelect
Colores.TextBox_3.ReadOnly: = .F.
* Colores.TextBox_3.DisabledFontColor: = aColorSelect
SetProperty ('Colors', 'TextBox_3', 'DisabledFontColor' aColorSelect)
Colores.TextBox_3.ReadOnly: = .T.
Refresh ()
CASE nOpcion = 7
ColorGets: = aColorSelect
Colores.TextBox_3.ReadOnly: = .F.
SetProperty ('Colors', 'TextBox_3', 'DisabledBackColor' aColorSelect)
Colores.TextBox_3.ReadOnly: = .T.
Refresh ()
Also I notice that if I use the sentence:
Code: Select all
Colores.TextBox_3.DisabledFontColor: = aColorSelect
I get the following error:
Code: Select all
Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/
C:\hmg.3.3.1\Mios\Colors\Main.prg (1148) E0030 Error Syntax error "syntax error at '.'"
1 error
I also note that the textbox in its control information is:
DEFINE TEXTBOX <controlname>
READONLY <lValue>
DisabledBackColor <aDisabledBackColor>
DISABLEDFONTCOLOR <aDisabledFontColor>
END TEXTBOX
and that their properties have:
Code: Select all
- FontColor
- DisabledBackColor
- DisabledFontColor
- caretPos
- ReadOnly
- Name (R)
- TabStop (D)
- Field (D)
- Parent (D)
- InputMask (D)
- Format (D)
- MaxLength (D)
- RightAlign (D)
- HelpID (D)
- CaseConvert (D)
- DataType (D)
Which: ReadOnly, DisabledFontColor DisabledBackColor and can be changed at runtime and does not.
I also note that the documentation for ReadOnly is unclear, simply:
Which I can sense it should be:
Code: Select all
Syntax:
ReadOnly <lValue> (Control Definition)
<WindowName> <ControlName> .ReadOnly:. = lValue
<WindowName> <ControlName> .ReadOnly -.> lValue
This should be specified as a numeric array element container containing three red, green and blue components.
And the property: DisabledBackColor has the same problem.
Code: Select all
Syntax:
DisabledBackColor <anColor>
Must be specified as a numeric array elements container containing three red, green and blue components
I know it's hard work, is a giant work, but I believe in my humble opinion,
should move concluding with solid things because I get discouraged to continue my project having so smoothly, I think it does not should be these things unresolved or only happens to me ?, I just checked machine turned refresh HMG and last patch and all the same.
regards
PS: And do not say just for me but for all those who started with HMG.