TEXTBOX - READONLY - BACKCOLOR
Moderator: Rathinagiri
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
TEXTBOX - READONLY - BACKCOLOR
Hola amigos
Tengo una aplicación que calcula Días entre fechas, los dos primeros TEXTBOX se
entran las fechas y el resto solo es para el resultado y el historico del calculo anterior.
Los TEXTBOX que solo son para informar del Resultado y el Resto es el historico.
-> READONLY .T. y BACKCOLOR {180,200,255} <-
Cuando se compila con HMG no se pueden entrar datos READONLY .T. pero el fondo
del TEXTBOX no cambia el color , si se compila con Extended o con ooHG se ve el fondo de color del TEXTBOX.
Si pueden aportar alguna solucion les estaria muy agradecido.
Hello friends
I have an application that calculates days between dates, the first two TextBox
enter the dates and the rest is only for the result and the previous calculation
historic.
The TextBox that just are to report the results and the rest is history.
-> READONLY. T. and BACKCOLOR (180,200,255) <-
When compiled with HMG can not enter data READONLY. T. but the bottom
TextBox does not change the color, if compiled with Extended or ooHG see the
background color of the TextBox.
If you could provide any solution will be very grateful.
Tengo una aplicación que calcula Días entre fechas, los dos primeros TEXTBOX se
entran las fechas y el resto solo es para el resultado y el historico del calculo anterior.
Los TEXTBOX que solo son para informar del Resultado y el Resto es el historico.
-> READONLY .T. y BACKCOLOR {180,200,255} <-
Cuando se compila con HMG no se pueden entrar datos READONLY .T. pero el fondo
del TEXTBOX no cambia el color , si se compila con Extended o con ooHG se ve el fondo de color del TEXTBOX.
Si pueden aportar alguna solucion les estaria muy agradecido.
Hello friends
I have an application that calculates days between dates, the first two TextBox
enter the dates and the rest is only for the result and the previous calculation
historic.
The TextBox that just are to report the results and the rest is history.
-> READONLY. T. and BACKCOLOR (180,200,255) <-
When compiled with HMG can not enter data READONLY. T. but the bottom
TextBox does not change the color, if compiled with Extended or ooHG see the
background color of the TextBox.
If you could provide any solution will be very grateful.
- Attachments
-
- ErrorSin.jpg (87.7 KiB) Viewed 17970 times
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: TEXTBOX - READONLY - BACKCOLOR
Compile Extended o ooHG
- Attachments
-
- ErrorColor.jpg (87.82 KiB) Viewed 17971 times
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: TEXTBOX - READONLY - BACKCOLOR
Los Prgs para su revision
Un saludo a todos
Mustafa
The PRGs for review
Greetings to all
Mustafa
Un saludo a todos
Mustafa
The PRGs for review
Greetings to all
Mustafa
- Attachments
-
- CalcuDay.zip
- (12.44 KiB) Downloaded 695 times
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: TEXTBOX - READONLY - BACKCOLOR
HMG establishes read-only property for a textbox, sending the appropiate message to the control using corresponding Windows API function, so, the behavior and appearance of the control is determined by Windows.mustafa wrote:Los Prgs para su revision
Un saludo a todos
Mustafa
The PRGs for review
Greetings to all
Mustafa
I've not care specially about this, because I think that the user must have a consistent experience across applications. That was the goal of the Windows API creators, so, a read-only textbox should look the same in all applications.
Anyway, I'll consider the addition of this feature in future versions.
And, if someone has some sample to help Mustafa on this, please, post here.
TIA.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: TEXTBOX - READONLY - BACKCOLOR
Hola Maestro Roberto
Gracias por tu dedicacion en este tema, muy agradecido
Hello Master Roberto
Thank you for your dedication in this matter, very grateful
Un cordial saludo
Mustafa![Razz :P](./images/smilies/icon_razz.gif)
Gracias por tu dedicacion en este tema, muy agradecido
Hello Master Roberto
Thank you for your dedication in this matter, very grateful
Un cordial saludo
Mustafa
![Razz :P](./images/smilies/icon_razz.gif)
Re: TEXTBOX - READONLY - BACKCOLOR
I think, this is the same problem as mine with progressbars as graphs - when I switch desktop for using windows themes, some settings of colours are from windows - when themes are off, all of them look as I defined them.
In my opinion, It would be great to programmatically control behavior of features - indenpendend from windows.
In my opinion, It would be great to programmatically control behavior of features - indenpendend from windows.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: TEXTBOX - READONLY - BACKCOLOR
The problem is basically because Windows XP/Vista/7 themes API are not fully backwards compatible with non-themed desktops. So, the same code that allowed you to change certain color when no XP theme is used, does not work when a theme is applied.mol wrote:I think, this is the same problem as mine with progressbars as graphs - when I switch desktop for using windows themes, some settings of colours are from windows - when themes are off, all of them look as I defined them.
In my opinion, It would be great to programmatically control behavior of features - indenpendend from windows.
This behavior is by design.
The only way to overcome this is to create owner-drown versions of the controls.
The problem with this is that the control should be re-coded on every windows version to be in-sync with them to 'mimic' each new theme look (I've simplified the problem to explain it, but is really more complicated).
Please, do not forget that the idea of the themes, is that each control type have the same look in all applications.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: TEXTBOX - READONLY - BACKCOLOR
Roberto Lopez wrote: The problem is basically because Windows XP/Vista/7 themes API are not fully backwards compatible with non-themed desktops. So, the same code that allowed you to change certain color when no XP theme is used, does not work when a theme is applied.
This behavior is by design.
The only way to overcome this is to create owner-drown versions of the controls.
The problem with this is that the control should be re-coded on every windows version to be in-sync with them to 'mimic' each new theme look (I've simplified the problem to explain it, but is really more complicated).
Please, do not forget that the idea of the themes, is that each control type have the same look in all applications.
Anyway, there is a dirty trick (always there is one
![Smile :)](./images/smilies/icon_e_smile.gif)
in \hmg\resources\minigui.rc, delete the line #6 (1 24 HMGRPATH\WindowsXP.Manifest) and recompile the resources...
and... VOILA!
Your application will not be themed even when XP style be active, so the colors will perform like in Win9x, so you could change progressbar color.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: TEXTBOX - READONLY - BACKCOLOR
Roberto Lopez wrote: Please, do not forget that the idea of the themes, is that each control type have the same look in all applications.
In the case that you attempt to research about this (and maybe contribute with a new control to HFCL), this is a good starting point:
http://www.tech-archive.net/Archive/VC/ ... 00336.html
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- edufloriv
- Posts: 238
- Joined: Thu Nov 08, 2012 3:42 am
- DBs Used: DBF, MariaDB, MySQL, MSSQL, MariaDB
- Location: PERU
Re: TEXTBOX - READONLY - BACKCOLOR
Estimado Mustafa,
Yo soluciono ese problema usando el atributo DISABLEDBACKCOLOR ya que son textbox que siempre serán de solo lectura:
Y el resultado me queda así:
Saludos cordiales.
Hi Mustafa,
I resolve that setting the textbox attribute DISABLEDBACKCOLOR when textbox is going to be always READONLY:
And this is the result:
Best regards.
Yo soluciono ese problema usando el atributo DISABLEDBACKCOLOR ya que son textbox que siempre serán de solo lectura:
Y el resultado me queda así:
Saludos cordiales.
Hi Mustafa,
I resolve that setting the textbox attribute DISABLEDBACKCOLOR when textbox is going to be always READONLY:
And this is the result:
Best regards.
Eduardo Flores Rivas
LIMA - PERU