************************************************** *-- Class: stb_txtnumber2 (c:\soykan\mysoftware\emin_elk\lib\soykan.vcx) *-- ParentClass: textbox *-- BaseClass: textbox *-- Time Stamp: 04/18/06 05:02:00 PM * DEFINE CLASS stb_txtnumber2 AS textbox Alignment = 1 Value = 0 Height = 23 InputMask = "999,999,999.99" Width = 100 Name = "stb_txtnumber2" SelectOnEntry = .t. PROCEDURE KeyPress Lparameters nKeyCode, nShiftAltCtrl Do Case Case nKeyCode=7 && del This.Value = 0 This.Refresh Case nKeyCode >= 48 And nKeyCode <= 57 * Digits 0 to 9 * need something to here Endcase ENDPROC PROCEDURE LostFocus This.BackColor= 16777215 ENDPROC PROCEDURE GotFocus IF this.SelectOnEntry NODEFAULT TextBox::GotFocus() ENDIF With This .Tag=Transform(.Value) .BackColor= Rgb(255,255,192) .Refresh Endwith ENDPROC PROCEDURE InteractiveChange _vfp.ActiveForm.changed = .t. _vfp.ActiveForm.addmode = .t. _vfp.ActiveForm.editmode = .t. this.BackColor= 8421631 ENDPROC ENDDEFINE * *-- EndDefine: stb_txtnumber2 **************************************************>Hi All,
>************************************************** >*-- Class: stb_txtnumber2 (c:\soykan\mysoftware\emin_elk\lib\soykan.vcx) >*-- ParentClass: textbox >*-- BaseClass: textbox >*-- Time Stamp: 04/18/06 05:02:00 PM >* >DEFINE CLASS stb_txtnumber2 AS textbox > > > Alignment = 1 > Value = 0 > Height = 23 > InputMask = "999,999,999.99" > Width = 100 > Name = "stb_txtnumber2" > > > PROCEDURE KeyPress > Lparameters nKeyCode, nShiftAltCtrl > Do Case > Case nKeyCode=7 && del > This.Value = 0 > This.Refresh > Case nKeyCode >= 48 And nKeyCode <= 57 > * Digits 0 to 9 > * need something to here > Endcase > ENDPROC > > > PROCEDURE LostFocus > This.BackColor= 16777215 > ENDPROC > > > PROCEDURE GotFocus > With This > .Tag=Transform(.Value) > .BackColor= Rgb(255,255,192) > .Refresh > Endwith > ENDPROC > > > PROCEDURE InteractiveChange > _vfp.ActiveForm.changed = .t. > _vfp.ActiveForm.addmode = .t. > _vfp.ActiveForm.editmode = .t. > this.BackColor= 8421631 > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: stb_txtnumber2 >************************************************** > >