Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Simple question

Posted on 2004-09-14
4
Medium Priority
?
504 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 23

Accepted Solution

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

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

610 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