DISABLEDFONTCOLOR at TextBox

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DISABLEDFONTCOLOR at TextBox

Post 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 :?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: DISABLEDFONTCOLOR at TextBox

Post by srvet_claudio »

I will check
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DISABLEDFONTCOLOR at TextBox

Post 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 :|
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DISABLEDFONTCOLOR at TextBox

Post 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 :|
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
EduardoLuis
Posts: 683
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: DISABLEDFONTCOLOR at TextBox

Post 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
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DISABLEDFONTCOLOR at TextBox

Post 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. :|
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply