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

In this message Javier told us.

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

Moderator: Rathinagiri
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
I appreciated your return.srvet_claudio wrote:I will check
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
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.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.-