Solved

Simple question

Posted on 2004-09-14
4
501 Views
Last Modified: 2010-04-05
I have 3 MaskEdit (mask1, mask2, mask3)
mask1 represent quantity
mask2 value
mask3 = quantity * value
mask3 is read only true
i want when i write some values (numeric values) in mask1 or mask2 the mask3 to change automaticaly = mask1*mask2
i try to put a action on mask1 and mask2 on keypressed, or in on change but didn't work , make the change only after one number, when i add more numbers nothing happend
Thanks
Hope i was clear
0
Comment
Question by:fradolcino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 25 total points
ID: 12052858
use the KeyUp event....when it occurs the text is already changed
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12052872
i mean

procedure TForm1.MaskEdit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
maskedit3.Text := FloatToStr(StrToFloat(Maskedit1.Text)*StrToFloat(MaskEdit2.Text));
end;
F68 ;-)
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12055354
A MaskEdit has an OnChange event that changes when the value changes... But if you just want numeric values, consider using a SpinEdit instead. Or combine the MaskEdit with a TUpDown from the Win32 tab. Set the Associate property of the UpDown to the MaskEdit and it will do some interesting things too.
The combination MaskEdit/UpDown allows you to get the value from the UpDown component while using the MaskEdit.OnChange event to change the third MaskEdit.
0
 
LVL 1

Expert Comment

by:Orionizer
ID: 12084005
A great set of edits that are much more powerful than the standard Delphi edits are ESB Consultants ESBPCS.  I can't recommend it enough!  The kit has specific edits for positive only, positive/negative integers, positive only, positive/negative floats, etc...

Check it out here:

http://www.esbconsult.com
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question