Solved

Simple question

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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