home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / del2faq.zip / CURREDIT.ZIP / CURREDIT.TXT < prev   
Text File  |  1995-03-29  |  2KB  |  36 lines

  1. The Unofficial Newsletter 
  2. of Delphi Users
  3. March 13th, 1995
  4.  
  5. by Robert Vivrette
  6.  
  7. CIS: 76416,1373
  8.  
  9. Component Design
  10.  
  11. Component Design is one of the most fascinating aspects of Delphi. I hadn't
  12. even thought of developing my own custom controls in BP7, VB, or C++, yet
  13. with Delphi I have already created 4. Below is my first custom control, so
  14. please be merciful.  I needed a simple currency edit field, and the 
  15. MaskEdit field simply does not cut it. I feel the CurrencyEdit field is a
  16. small step forward in usability. It isn't perfect and can definitely be
  17. improved on.
  18.  
  19. Essentially, the CurrencyEdit field is a modified memo field. I have put in
  20. keyboard restrictions, so the user cannot enter invalid characters. When the
  21. user leaves the field, the number is reformatted to display appropriately. 
  22. You can left-, center-, or right-justify the field, and you can also specify
  23. its display format - see the FormatFloat command. Since an modifiable
  24. display format is used, it really doesnt even need to hold a currency value.
  25. It could just as easily be a percentage, or a high-precision real value with
  26. fixed digits to the right of the decimal. The field value is stored in a
  27. property called Value so you should read and write to that in your program.
  28. This field is of type Extended.
  29.  
  30. If you like this control you can feel free to use it, however, if you modify
  31. it, I would like you to send me whatever you did to it. If you send me your
  32. CIS ID, I will send you copies of my custom controls that I develop in the 
  33. future. Please feel free to send me anything you are working on as well.
  34. Perhaps we can spark ideas!
  35.  
  36.