Solved

Simple question

Posted on 2004-09-14
4
498 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now