home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / diredit.zip / DirectoryEdit.txt < prev    next >
Text File  |  1999-08-15  |  2KB  |  83 lines

  1. TDirectoryEdit component
  2. for SpeedSoft Sibyl
  3.  
  4. Written by Aaron Lawrence (aaronl@clear.net.nz)
  5.  
  6. Summary
  7. -------
  8.  
  9. This Sibyl component looks like a normal text edit box.
  10. However, it acts as a directory selector, when you press enter.
  11. If the direcctory does not exist it just beeps. If it does,
  12. then an event is called for your code to do what it will with 
  13. (probably setting the directory of a TFilelistBox).
  14.  
  15. This would not be so useful, except that this component also implements
  16. directory completion like 4OS/2 and other shells. If you press tab,
  17. then it looks for a directory matching what you've typed so far, and if
  18. found it selects it. If you press tab again it looks for the next match.
  19. And so on.
  20.  
  21. Overriding the tab and enter keys like this is not normally the 'done thing'
  22. for GUIs but it's pretty handy. You can use Ctrl-Tab to shift focus as the
  23. tab key would normally do.
  24.  
  25. License
  26. -------
  27.  
  28. This component is freeware, but comments would be appreciated!
  29. I make no warranty as to it's safe operation... etc.
  30.  
  31. You may modify the source code and use it in your own projects.
  32.  
  33. What you need
  34. -------------
  35.  
  36. You should have these files:
  37.  
  38. DirectoryEdit.pas
  39. DirectoryEdit.bmp
  40.  
  41. Installation
  42. ------------
  43.  
  44. Load DirectoryEdit.pas into Sibyl, and compile it with Project - Compile.
  45.  
  46. Then, use Component - Install Component
  47. Select DirectoryEdit.SPU (which you just produced by compiling DirectoryEdit.pas)
  48.  
  49. Click the >> button to add the component.
  50.  
  51. Click OK.
  52.  
  53. Notes:
  54. - If you have a project open, Sibyl may ask if you want to save it,
  55.   since it needs to close the project to install the component.
  56.  
  57. - If you're reinstalling this component, Sibyl will say an Error,
  58.    but will reinstall it anyway :-|
  59.  
  60. The component should now appear under the User tab.
  61.  
  62. Using the component
  63. -------------------
  64.  
  65. Just stick a Directory Edit on a form. 
  66.  
  67. You can set the directory just by changing it's text.
  68.  
  69. To react to directory selection, set the OnChangeDirectory event.
  70. You will be passed the new directory (which you can also get
  71. just by reading the text)
  72.  
  73.  
  74. Problems/limitations
  75. --------------------
  76.  
  77. This seems to work perfectly well, without any problems I have noticed.
  78.  
  79. It keeps a File search open while it is running (using the FindFirst
  80. and FindNext functions) so this could potentially be a problem if you
  81. used lots of these components.
  82.  
  83.