Page 1 of 1

DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 12:26 am
by Pablo César
Hi Claudio,

I do not know if this is a HMG bug or normal behaviour in API demands...

DISABLEDFONTCOLOR at TextBox, do not change color at all :shock:

In this message Javier told us. :oops:

I'm using in Win7 32 bits classic style. I do not know what I am doing worng :?

Re: DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 12:36 am
by srvet_claudio
I will check

DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 12:58 am
by Pablo César
I have mentioned about API (I do not know if this term is correct) which probably this strange behaviour is normal in Windows appearance.

I done a simple test code:

Code: Select all

#include <hmg.ch>

Function Main()
DEFINE WINDOW FORM_1 AT 132 , 235 WIDTH 550 HEIGHT 350 MAIN

    DEFINE TEXTBOX Text_1
        ROW    90
        COL    180
        WIDTH  160
        HEIGHT 24
        DISABLEDFONTCOLOR RED
        VALUE "FONT IN RED COLOR"
    END TEXTBOX
	
	DEFINE TEXTBOX Text_2
        ROW    120
        COL    180
        WIDTH  160
        HEIGHT 24
        VALUE "FONT normal COLOR"
    END TEXTBOX

END WINDOW
Form_1.Text_2.SetFocus

Form_1.Text_1.Enabled := .F. // Not working
Form_1.Text_1.ReadOnly := .T.

CENTER WINDOW   Form_1
ACTIVATE WINDOW Form_1
Return Nil
If you comment the line 27 where is Form_1.Text_1.ReadOnly := .T. you will see is not working. Only works with ReadOnly property. But I do not wish to setcursor in it :|

DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 12:59 am
by Pablo César
srvet_claudio wrote:I will check
I appreciated your return.

I have mentioned about API (I do not know if this term is correct) which probably this strange behaviour is normal in Windows appearance.

I done a simple test code:

Code: Select all

#include <hmg.ch>

Function Main()
DEFINE WINDOW FORM_1 AT 132 , 235 WIDTH 550 HEIGHT 350 MAIN

    DEFINE TEXTBOX Text_1
        ROW    90
        COL    180
        WIDTH  160
        HEIGHT 24
        DISABLEDFONTCOLOR RED
        VALUE "FONT IN RED COLOR"
    END TEXTBOX
	
	DEFINE TEXTBOX Text_2
        ROW    120
        COL    180
        WIDTH  160
        HEIGHT 24
        VALUE "FONT normal COLOR"
    END TEXTBOX

END WINDOW
Form_1.Text_2.SetFocus

Form_1.Text_1.Enabled := .F. // Not working
Form_1.Text_1.ReadOnly := .T.

CENTER WINDOW   Form_1
ACTIVATE WINDOW Form_1
Return Nil
If you comment the line 27 where is Form_1.Text_1.ReadOnly := .T. you will see is not working. Only works with ReadOnly property. But I do not wish to setcursor in it :|

Re: DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 1:54 pm
by EduardoLuis
Hi Pablo:

Yes you are right, but this is not an issue relationship with Hmg 3.43 and or Win version.-
If my memory don't fail, this becomes from older HMG versions (3.046 and later).-

I've implement your proposal, READONLY instead of dissablefontcolor.-

Just for the records, i test my app developed with the latest HMG version on several WIN os.- This shows me that the more stable ones were those that i compiled under WIN XP and execute them on later WIN os, withouth any issues.-

With regards.
Eduardo

DISABLEDFONTCOLOR at TextBox

Posted: Fri Oct 07, 2016 2:17 pm
by Pablo César
EduardoLuis wrote:I've implement your proposal, READONLY instead of dissablefontcolor.-

Just for the records, i test my app developed with the latest HMG version on several WIN os.- This shows me that the more stable ones were those that i compiled under WIN XP and execute them on later WIN os, withouth any issues.-
Hi Eduardo and thank you for your testing. But I would like a changeable option when control is disabled without to add a routine for escaping when user makes focus in it. :|