Solved

Simple question

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
indy tidtcpclient threading issue 8 54
Delphi : could not find program, '...exe' 2 117
Delphi selector screen 2 58
find a node in VST 2 47
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

16 Experts available now in Live!

Get 1:1 Help Now