Hi.
I'm using Visual WebGui 6.3.7a for .NET 3.5, trying to use the ValueChanged event in the NumericUpDown, but the event fires when the control lose the focus.
This is the Control i'm using and it's propertyes:
//
// tbPercDescto
//
this.tbPercDescto.DecimalPlaces = 2;
this.tbPercDescto.HideButtons = true;
this.tbPercDescto.Increment = new decimal(new int[] {
1,
0,
0,
0});
this.tbPercDescto.Location = new System.Drawing.Point(374, 48);
this.tbPercDescto.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.tbPercDescto.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.tbPercDescto.Name = "tbPercDescto";
this.tbPercDescto.Size = new System.Drawing.Size(75, 20);
this.tbPercDescto.TabIndex = 1;
this.tbPercDescto.TextAlign = Gizmox.WebGUI.Forms.HorizontalAlignment.Left;
this.tbPercDescto.ThousandsSeparator = true;
this.tbPercDescto.UpDownAlign = Gizmox.WebGUI.Forms.LeftRightAlignment.Left;
this.tbPercDescto.Value = new decimal(new int[] {
1,
0,
0,
0});
this.tbPercDescto.ValueChanged += new System.EventHandler(this.tbPercDescto_ValueChanged);
And this is the code i'm trying to use in the Event:
if ((tbPercDescto.Focused) && (tbPercDescto.Value > 0))
{
tbVlrDesconto.Value = (tbPreco.Value * tbPercDescto.Value) / 100;
}
Any help is appreciated, Thanks.
Giovanni