home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / zkuste / delphi / kolekce / d123456 / DFS.ZIP / IconCtls.txt < prev    next >
Text File  |  2001-06-28  |  12KB  |  219 lines

  1. TdfsIconComboBox and TdfsIconListBox v1.16
  2.  
  3. Description:
  4.   A dropdown list style combobox that displays the icons that exist in a given
  5.   file, and a listbox that displays the icons that exist in a given file,
  6.   either horizontally or vertically.
  7.  
  8.   Features:
  9.     Optionally, the control can disable itself when the filename is invalid.
  10.     Optionally, the control can load icons "on demand."  This speeds up the
  11.       initialization process greatly because all icons do not have to be loaded
  12.       when the control is created.
  13.     Many file formats can be read from, including:
  14.       .EXE, .DLL, .ICO
  15.       .ICL { PCTools? Icon Library
  16.       .NIL { Norton Icon Library
  17.     ListBox can simulate a grid of icons, allowing you to set the number of
  18.       icons to be displayed in both the X and Y direction.  This setting can be
  19.       changed dynamically.
  20.  
  21. Contact Information:
  22.   The lateset version will always be available on the web at:
  23.     http://www.delphifreestuff.com
  24.   If you have any questions, comments or suggestions, please use the Delphi
  25.   Free Stuff Support Forum at: 
  26.     http://www.delphifreestuff.com/discus/
  27.   If, for some reason, you can not use the web-based support forum, you can
  28.   email me at bstowers@delphifreestuff.com.  However, the support forum will
  29.   always take precedence over direct email since it provides a resource that
  30.   others can use when they have a problem.  Every message posted to the forum
  31.   is emailed directly to this account, so emailing me directly will not get 
  32.   your message to me any faster.  It will only make the message less important
  33.   for me to respond to since only one person (you) is benefiting from it
  34.   instead of everyone interested.  Having said all that, please do email me 
  35.   directly if it is regarding something that isn't really support related, 
  36.   i.e. just to say thanks (as novel as that idea is).  
  37.  
  38.  
  39. Installation:
  40.   Delphi 1:
  41.     * Select the 'Options | Install Components' menu item.
  42.     * In the Install Components dialog, click the Add button.
  43.     * In the Add Module dialog, enter the full path name of the component's 
  44.       registration unit (the unit that ends with 'Reg.pas', i.e. 
  45.       'BrowseDrReg.pas') and click OK.
  46.     * In the Add Module dialog, click OK.
  47.     * The component library will be rebuilt and a new tab named 'DFS' will
  48.       be available on the Component Palette.
  49.  
  50.   Delphi 2, C++Builder 1:
  51.     * Select the 'Component | Install' menu item.
  52.     * In the Install Components dialog, click the Add button.
  53.     * In the Add Module dialog, enter the full path name of the component's
  54.       registration unit (the unit that ends with 'Reg.pas', i.e.
  55.       'BrowseDrReg.pas') and click OK.
  56.     * In the Add Module dialog, click OK.
  57.     * The component library will be rebuilt and a new tab named 'DFS' will be
  58.       available on the Component Palette.
  59.  
  60.   Delphi 3, 4, 5, C++Builder 3 & 4:
  61.     * Do one of the following:
  62.       + Create a new package by selecting File | New and choosing Package from
  63.         the New tab in the dialog.
  64.       + Open an existing package file.  I suggest you do this if you already 
  65.         have a package that you like to use for small, third party components.
  66.         I specifically have a package named "3rdParty.dpk" that I use for 
  67.         small components that come from other people.  Or, if you are using
  68.         several of my components, you might create a "DFS.dpk" package and 
  69.         use it for all of my DFS components.
  70.     * In the resulting package window, click the Add button.
  71.     * In the Add dialog, on the Add Unit tab, enter the full path name of the 
  72.       component's registration unit (the unit that ends with 'Reg.pas', i.e. 
  73.       'BrowseDrReg.pas') and click OK.
  74.     * You may want to add the other source files (*.pas) to the package as 
  75.       well in the same manner as you did the registration unit.  While this is
  76.       not required, not doing it will cause compiler warnings when the package
  77.       is compiled.  The component will function fine either way, but I 
  78.       personally find the warnings very irritating and am not happy until 
  79.       every compiler warning and hint is gone.
  80.     * If this package is new, or it has never been installed, click the 
  81.       Install button in the package window.  If this package is already 
  82.       installed in Delphi, click the Compile button.
  83.  
  84.   C++Builder 5 and up:
  85.     * Perform the "Delphi 3 and up, C++Builder 3 and up" steps above, except
  86.       for the last step (Compile or Install).
  87.     * Select the package the component has been added to, and choose 
  88.       Project | Edit Option Source to open the package options in the editor.
  89.     * In the entry for PFLAGS, add the "-LUvcl50" option.  For example:
  90.         <PFLAGS value="-$YD -$W -$O -v -JPHNE -M -LUvcl50"/>
  91.     * Perform the final step from above, Compile or Install.
  92.     * For Borland's official word on this situation, open the C++Builder help
  93.       file and search the index for "dsgnintf.dcu" and see the "Compiling
  94.       packages with DsgnIntf" section.
  95.  
  96.   Delphi 6 and up:
  97.     * Perform the "Delphi 3, 4, 5, C++Builder 3 & 4" steps above, except
  98.       for the last step (Compile or Install).
  99.     * Add the DesignIDE package to the Requires list of the package into which
  100.       the component is being installed.
  101.     * Perform the final step from above, Compile or Install.
  102.     * This is necessary because of changes to the design-time support units
  103.       introduced in Delphi 6.  For complete information, see the Del6New.hlp
  104.       file in your Delphi 6 Help directory.  In the index, search for
  105.       "upgrade issues" and in the resulting list of topics, select the
  106.       "DsgnIntf renamed and related changes" topic.
  107.  
  108.  
  109. Notes:
  110.   A note about TCustomComboBox (parent of TComboBox, and all combo descendants)
  111.   and the owner drawn styles (csOwnerDrawFixed and csOwnerDrawVariable):
  112.   TCustomComboBox has a design problem, in my opinion.  The DropDownCount
  113.   property is used to specify how many items are to be displayed when the
  114.   ComboBox is "opened." This property works fine, as long as the size of what
  115.   you are displaying is based on the font assigned to the control.  If you look
  116.   at the TCustomComboBox.AdjustDropDown method in the VCL source code
  117.   (STDCTRLS.PAS), you will see that to calculate the size of the dropdown
  118.   window, the DropDownCount property is multiplied by the height of the
  119.   control's font.  This is all well and good if what you are drawing is based
  120.   on the font.  In this case, however, we are drawing based on the size of an
  121.   icon. The calculation should be based on DropDownCount and the ItemHeight
  122.   property, IMHO. There are two ways that I can think of to work around this
  123.   problem.
  124.   1) The simplest method is to just ensure that your Font.Height is equal to
  125.      your ItemHeight.  Note that you should probably use a TrueType font for
  126.      Font.Name so that you can cover a wide range of sizes.
  127.   2) Fix the VCL source code so that it does the calculation properly.
  128.  
  129. Known Issues:
  130.   * There are no known issues at this time.
  131.  
  132. TdfsIconComboBox Revision History:
  133.   1.16   + Updated for Delphi 6 compatibility.  See updated install directions
  134.            above.
  135.   1.15   + Updated for C++Builder 5 compatibility.
  136.   1.14   + It's *really* D5 compatible now.  Small change between the D5 eval
  137.            version and the real, shipping D5 version broke it.
  138.   1.13   + Wouldn't compile under D1, C1 or D2.  Who knows how long it's been
  139.            that way.
  140.   1.12   + Classname changed.
  141.          + OnChange was not published.
  142.          + D5 compatibility.
  143.   1.11   + Added IcCtlReg unit.  All IDE specific code (i.e. registering the
  144.            component, property editors, etc.) are contained in this unit.  This
  145.            was done for two primary reasons:  1) Using the component in a
  146.            Delphi or C++Builder expert would register the component as well.
  147.            2) Reduce code size in some cases -- usually the smart linker
  148.            removes this sort of stuff since the app never references it, but
  149.            now it's for certain since it isn't even in the unit.  This change
  150.            means that you need to install the component using the new
  151.            "registration" unit instead of the unit containing the component.
  152.   1.10:  + Updated for Delphi 4 compatibility.
  153.   1.09:  + Added public Icon property.  This is useful for doing things like
  154.            extracting and saving a specific icon.  Note that the TIcon returned
  155.            by this property is owned by the component; you should NEVER free it.
  156.   1.08:  + Added Version property.
  157.   1.07:  + Fixed nasty memory leak.
  158.   1.06:  + Fixed problem with C++Builder 3 run-time packages.
  159.   1.05:  + Updated for new DFS.INC file, component tab name, history/comments
  160.            file.
  161.   1.04:  + Small change for C++Builder compatibility.
  162.   1.03:  + Resource for 16 and 32-bit version.  This takes the place of a
  163.            DCR file, which can't be compatible with both.  See the $R directive
  164.            below. To compile the resource file, use the following:
  165.              Delphi 1: BRCC.EXE -foIconCtls.r16 -31 IconCtls.rc
  166.              Delphi 2: BRCC32.EXE -foIconCtls.r32 -w32 IconCtls.rc
  167.   1.02:  + Fixed problem under Delphi 2.0.
  168.   1.01:  + Added read-only property: NumberOfIcons
  169.          + Updated demo program to use NumberOfIcons and allow DropDownCount to
  170.            be changed on the fly.
  171.          + Added OnFileChange event.  Useful for updating statics like Number
  172.            of icons.
  173.   1.00:  + Initial release
  174.  
  175.  
  176. TdfsIconListBox Revision History:
  177.   1.15:  + Updated for C++Builder 5 compatibility.
  178.   1.14   + It's *really* D5 compatible now.  Small change between the D5 eval 
  179.            version and the real, shipping D5 version broke it.
  180.   1.13   + Wouldn't compile under D1, C1 or D2.  Who knows how long it's been 
  181.            that way.
  182.   1.12   + Classname changed.
  183.          + Got rid of OnChange event.  OnClick is the same thing.
  184.          + D5 compatibility.
  185.   1.11   + Added IcCtlReg unit.  All IDE specific code (i.e. registering the
  186.            component, property editors, etc.) are contained in this unit.  This
  187.            was done for two primary reasons:  1) Using the component in a
  188.            Delphi or C++Builder expert would register the component as well.
  189.            2) Reduce code size in some cases -- usually the smart linker
  190.            removes this sort of stuff since the app never references it, but
  191.            now it's for certain since it isn't even in the unit.  This change
  192.            means that you need to install the component using the new
  193.            "registration" unit instead of the unit containing the component.
  194.   1.10:  + Updated for Delphi 4 compatibility.
  195.   1.09:  + Added public Icon property.  This is useful for doing things like
  196.            extracting and saving a specific icon.  Note that the TIcon returned
  197.            by this property is owned by the component; you should NEVER free it.
  198.          + The following was done by Richard Fellner (r.fellner@xpoint.at):
  199.            Even if there is enough space for all icons to display in a row, the
  200.            component displays the white space for the scrollbar.  Fixed.
  201.   1.08:  + Added Version property.
  202.   1.07:  + Fixed nasty memory leak.
  203.   1.06:  + Fixed problem with C++Builder 3 run-time packages.
  204.   1.05:  + Updated for new DFS.INC file, component tab name, history/comments
  205.            file.
  206.   1.04:  + Small change for C++Builder compatibility.
  207.   1.03:  + Resource for 16 and 32-bit version.  This takes the place of a
  208.            DCR file, which can't be compatible with both.  See the $R directive
  209.            below. To compile the resource file, use the following
  210.            Delphi 1: BRCC.EXE -foIconCtls.r16 -31 IconCtls.rc
  211.            Delphi 2: BRCC32.EXE -foIconCtls.r32 -w32 IconCtls.rc
  212.   1.02:  + Published Align property.
  213.          + Fixed problem under Delphi 2.0.
  214.   1.01:  + Added OnFileChange event.  Useful for updating statics like Number of
  215.            icons.
  216.          + Fixed bug in ResetSize that caused width calculation to be incorrect.
  217.   1.00:  + Initial release
  218.  
  219.