1. I tried to use the FontColor and BackColor in TEXTBOX, but when compile... its ERROR !
Any suggestion on how to use it ?
Thks n Rgds
Chang

Moderator: Rathinagiri
Code: Select all
/*
* HMG - Harbour Win32 GUI library Demo
*
* Copyright 2002 Roberto Lopez <mail.box.hmg@gmail.com>
* http://www.hmgforum.com//
*/
#include "hmg.ch"
#define YELLOW { 255, 255, 000 }
#define PINK { 255, 128, 192 }
#define RED { 255, 000, 000 }
#define FUCHSIA { 255, 000, 255 }
#define BROWN { 128, 064, 064 }
#define ORANGE { 255, 128, 064 }
#define GREEN { 000, 255, 000 }
#define PURPLE { 128, 000, 128 }
#define BLACK { 000, 000, 000 }
#define WHITE { 255, 255, 255 }
#define GRAY { 128, 128, 128 }
#define BLUE { 000, 000, 255 }
#define VERDE { 000, 128, 000 }
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'HMG Demo' ;
MAIN
@ 10,10 TEXTBOX Text_1 ;
VALUE 123 ;
TOOLTIP 'Numeric TextBox' ;
NUMERIC ;
MAXLENGTH 5 ;
FONTCOLOR BLUE;
BACKCOLOR RED;
RIGHTALIGN ;
ON LOSTFOCUS if ( This.Value < 100 , This.SetFocus , Nil)
@ 40,10 TEXTBOX Text_2 ;
VALUE 'Hi All' ;
TOOLTIP 'Character TextBox' ;
DISABLEDBACKCOLOR { 0,255,0 } ;
DISABLEDFONTCOLOR { 255,255,255 }
DEFINE BUTTON C
ROW 250
COL 100
WIDTH 160
CAPTION 'Set Text_2 ReadOnly .T.'
ACTION Form_1.Text_2.ReadOnly := .T.
END BUTTON
DEFINE BUTTON D
ROW 250
COL 290
WIDTH 160
CAPTION 'Set Text_2 ReadOnly .F.'
ACTION Form_1.Text_2.ReadOnly := .F.
END BUTTON
END WINDOW
Form_1.Center
Form_1.Activate
Return Nil
Hola Javier :Javier Tovar wrote: @ 10,10 TEXTBOX Text_1 ;
VALUE 123 ;
TOOLTIP 'Numeric TextBox' ;
FONTCOLOR BLUE;
BACKCOLOR RED;
NUMERIC INPUTMASK "99999" ;
ON LOSTFOCUS if ( This.Value < 100 , This.SetFocus , Nil);
RIGHTALIGN
Saludos
Code: Select all
MaxLength Property
Specifies the maximun input length for a TextBox control
Syntax:
MaxLength <nValue>
Code: Select all
MaxLength Property
Specifies the input maximun length for a TextBox control
Syntax:
MaxLength <nValue>