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

  1. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2. If you have used versions of this component prior to v2.00 and have existing
  3. forms with the TdfsColorButton component on them, please read the README.NOW
  4. file included with this archive before doing anything else.
  5. -------------------------------------------------------------------------------
  6.  
  7. TdfsColorButton v2.62
  8.  
  9. Description:
  10.   A Windows 95 and NT 4 style color selection button.  It displays a palette
  11.   of 20 color for fast selction and a button to bring up the color dialog.
  12.   Copyright 1996, Brad Stowers.  All Rights Reserved.
  13.   This component can be freely used and distributed in commercial and private
  14.   environments, provied this notice is not modified in any way and there is
  15.   no charge for it other than nomial handling fees.  Contact me directly for
  16.   modifications to this agreement.
  17.  
  18.  
  19. Contact Information:
  20.   The lateset version will always be available on the web at:
  21.     http://www.delphifreestuff.com
  22.   If you have any questions, comments or suggestions, please use the Delphi
  23.   Free Stuff Support Forum at: 
  24.     http://www.delphifreestuff.com/discus/
  25.   If, for some reason, you can not use the web-based support forum, you can
  26.   email me at bstowers@delphifreestuff.com.  However, the support forum will
  27.   always take precedence over direct email since it provides a resource that
  28.   others can use when they have a problem.  Every message posted to the forum
  29.   is emailed directly to this account, so emailing me directly will not get 
  30.   your message to me any faster.  It will only make the message less important
  31.   for me to respond to since only one person (you) is benefiting from it
  32.   instead of everyone interested.  Having said all that, please do email me 
  33.   directly if it is regarding something that isn't really support related, 
  34.   i.e. just to say thanks (as novel as that idea is).  
  35.  
  36.  
  37. Installation:
  38.   Delphi 1:
  39.     * Select the 'Options | Install Components' menu item.
  40.     * In the Install Components dialog, click the Add button.
  41.     * In the Add Module dialog, enter the full path name of the component's 
  42.       registration unit (the unit that ends with 'Reg.pas', i.e. 
  43.       'BrowseDrReg.pas') and click OK.
  44.     * In the Add Module dialog, click OK.
  45.     * The component library will be rebuilt and a new tab named 'DFS' will
  46.       be available on the Component Palette.
  47.   
  48.   Delphi 2, C++Builder 1:
  49.     * Select the 'Component | Install' menu item.
  50.     * In the Install Components dialog, click the Add button.
  51.     * In the Add Module dialog, enter the full path name of the component's 
  52.       registration unit (the unit that ends with 'Reg.pas', i.e. 
  53.       'BrowseDrReg.pas') and click OK.
  54.     * In the Add Module dialog, click OK.
  55.     * The component library will be rebuilt and a new tab named 'DFS' will be
  56.       available on the Component Palette.
  57.  
  58.   Delphi 3, 4, 5, C++Builder 3 & 4:
  59.     * Do one of the following:
  60.       + Create a new package by selecting File | New and choosing Package from
  61.         the New tab in the dialog.
  62.       + Open an existing package file.  I suggest you do this if you already 
  63.         have a package that you like to use for small, third party components.
  64.         I specifically have a package named "3rdParty.dpk" that I use for 
  65.         small components that come from other people.  Or, if you are using
  66.         several of my components, you might create a "DFS.dpk" package and 
  67.         use it for all of my DFS components.
  68.     * In the resulting package window, click the Add button.
  69.     * In the Add dialog, on the Add Unit tab, enter the full path name of the 
  70.       component's registration unit (the unit that ends with 'Reg.pas', i.e. 
  71.       'BrowseDrReg.pas') and click OK.
  72.     * You may want to add the other source files (*.pas) to the package as 
  73.       well in the same manner as you did the registration unit.  While this is
  74.       not required, not doing it will cause compiler warnings when the package
  75.       is compiled.  The component will function fine either way, but I 
  76.       personally find the warnings very irritating and am not happy until 
  77.       every compiler warning and hint is gone.
  78.     * If this package is new, or it has never been installed, click the 
  79.       Install button in the package window.  If this package is already 
  80.       installed in Delphi, click the Compile button.
  81.  
  82.   C++Builder 5 and up:
  83.     * Perform the "Delphi 3 and up, C++Builder 3 and up" steps above, except
  84.       for the last step (Compile or Install).
  85.     * Select the package the component has been added to, and choose 
  86.       Project | Edit Option Source to open the package options in the editor.
  87.     * In the entry for PFLAGS, add the "-LUvcl50" option.  For example:
  88.         <PFLAGS value="-$YD -$W -$O -v -JPHNE -M -LUvcl50"/>
  89.     * Perform the final step from above, Compile or Install.
  90.     * For Borland's official word on this situation, open the C++Builder help
  91.       file and search the index for "dsgnintf.dcu" and see the "Compiling
  92.       packages with DsgnIntf" section.
  93.  
  94.   Delphi 6 and up:
  95.     * Perform the "Delphi 3, 4, 5, C++Builder 3 & 4" steps above, except
  96.       for the last step (Compile or Install).
  97.     * Add the DesignIDE package to the Requires list of the package into which
  98.       the component is being installed.
  99.     * Perform the final step from above, Compile or Install.
  100.     * This is necessary because of changes to the design-time support units
  101.       introduced in Delphi 6.  For complete information, see the Del6New.hlp
  102.       file in your Delphi 6 Help directory.  In the index, search for
  103.       "upgrade issues" and in the resulting list of topics, select the
  104.       "DsgnIntf renamed and related changes" topic.
  105.  
  106.  
  107. Known Issues:
  108. * There are no known issues at this time.
  109.  
  110.  
  111. Revision History:
  112. 2.61:  + Updated for Delphi 6 compatibility.  See updated install directions
  113.          above.
  114. 2.60:  + Updated for C++Builder 5 compatibility.
  115. 2.59:  + It's *really* D5 compatible now.  Small change between the D5 eval
  116.           version and the real, shipping D5 version broke it.
  117.  2.58   + Wouldn't compile under Delphi 2.  Don't know how long it's been that
  118.           way.  Does that mean Delphi 2 has finally died and I can stop
  119.           supporting it?
  120.  2.57   + D5 compatibility.
  121.  2.56   + If the button was on something other than a form, say a tab page,
  122.           the form's caption did not get fixed up when the palette was
  123.           displayed.
  124.  2.55   + I had a report that the bitmap handle assignments with LoadResource
  125.           were failing for Eduardo Martins who had a large project, but that
  126.           changing to LoadFromResource fixed it.  I've updated to use this fix
  127.           for all but Delphi 1, which doesn't have that method in TBitmap.
  128.  2.54   + Added CBtnReg unit.  All IDE specific code (i.e. registering the
  129.           component, property editors, etc.) are contained in this unit.  This
  130.           was done for two primary reasons:  1) Using the component in a Delphi
  131.           or C++Builder expert would register the component as well.  2) Reduce
  132.           code size in some cases -- usually the smart linker removes this sort
  133.           of stuff since the app never references it, but now it's for certain
  134.           since it isn't even in the unit.  This change means that you need to
  135.           install the component using the new "registration" unit instead of
  136.           the unit containing the component.
  137.  2.53   + Moved hard-coded strings to resourcestrings for Delphi/Builder 3 and
  138.           higher.  They are normal consts for older compilers.  This aids in
  139.           internationalizing an app.
  140.  2.52   + The form that owns the button no longer appears to be inactive when
  141.           the color palette is displayed.  I'm using FlashWindow to fool
  142.           Windows into showing the form's caption bar in the active state.
  143.           Many thanks to AISSSoft@aol.com for this idea.
  144.  2.51   + Minor update for Delphi 4 compatibility.
  145.  2.50   + Added CycleColors property.  If set, clicking on the color portion of
  146.           the button will cycle to the next palette color, and clicking on the
  147.           arrow portion will drop down the palette.  If not set, it functions
  148.           as before, dropping the palette no matter where it was clicked.
  149.         + Flat buttons (Win32 only) look more like they do in IE4.  Doesn't have
  150.           as hard of an edge on it now.
  151.         + Clicking the button while the color palette is displayed will now hide
  152.           the color palette instead of redisplaying it.
  153.         + Flat buttons (Win32 only) now draw as if they were selected at
  154.           design-time.  Behaves more like standard flat speed/toolbar buttons.
  155.         + OtherColor property value could get reset during execution.
  156.         + Added public property IgnoreTopmosts.  If you set this to TRUE, the
  157.           calls to NormalizeTopMosts and RestoreTopmosts will NOT be made.
  158.           Normally, these calls should be fine, but I have had some reports of
  159.           strange things going on with window z-orders being changed around and
  160.           I suspect these calls might be doing it.  If you aren't experiencing
  161.           anything like this, you can safely ignore this property.
  162.         + Added ShowColorHints property and related OnGetColorHintText event.
  163.           Setting this property causes the color palette to show a hint for
  164.           each color square that displays the RGB value of the color.  For
  165.           example, then hint for a white square would be 'RGB = 255 255 255'.
  166.           This hint string can be modified via the OnGetColorHintText event.
  167.           This event is passed the TColor that needs a hint, the X, Y index into
  168.           the palette color array (not the X,Y cursor position) where 0,0 is the
  169.           "other" color, and a var string parameter to put the hint text in.
  170.           This string initially will contain the default hint text, and setting
  171.           it to an empty string ('') will prevent the hint from showing at all.
  172.  2.11   + Added Version property.
  173.  2.10   + 32-bit version now has a keyboard interface.  Works as you would
  174.           expect: left, right, up and down keys move around.  Won't work in
  175.           Delphi 1 because of a VCL bug that insists on focusing the "Other"
  176.           button.  D2, D3, C1 and C3 do not have this problem.
  177.  2.01   + Fixed CustomColors property editor.  It was not wide enough for all
  178.           of the color boxes.
  179.         + Fixed internal compiler error when compiled under C++Builder 1 with
  180.           Pascal compiler options enabled.
  181.         + Fixed problem with C++Builder 3 run-time packages.
  182.  2.00   + The "stream read error" fix broke something else; PaletteColors and
  183.           CustomColors properties would never write updated data, so any changes
  184.           you made to them at design-time would be lost if you viewed them as
  185.           text or closed the form.  I've REALLY fixed it this time, but I've
  186.           broken previous versions because the streaming mechanism changed
  187.           again (for the LAST time, NEVER AGAIN, I promise).  Make sure you
  188.           read the README.NOW file if you are upgrading from a previous version.
  189.         + There was no visual indication if the button was disabled (Enabled
  190.           property set to false).  The color box is now "shaded" out and the
  191.           drop down arrow is gray.
  192.         + Added work-around for a bug in the Delphi 2 compiler.  With
  193.           optimizations enabled, the DrawItem method would not compile.  I've
  194.           selectively turned off compiler optimization for that routine if you
  195.           are compiling under Delphi 2.
  196.         + Framing rectangles in the color palette were not using system defined
  197.           3D colors.  The also suffered from the LineTo problem that the drop
  198.           down arrow used to.  Thanks to J. C. Kiran <jace@radiolink.net> for
  199.           this one.
  200.         + Fixed problem with EnumObjects call causing GPFs under Delphi 1.
  201.           Thanks go to Bruno Sonnino <sonnino@netmogi.com.br> for this one.
  202.  1.80   + Fixed the "stream read error" when trying to copy the component or
  203.           edit a form containing it as text.  Unfortunately, this makes it
  204.           incompatible with previous versions of the component.  You will have
  205.           to manually remove any TdfsColorButton components you have on your
  206.           forms.  Next, open the CBtnForm.pas file and remove the period from
  207.           the first line so that it reads:
  208.             {$DEFINE FIX_STREAM_ERROR}
  209.           Now recompile the component into Delphi and re-add the component to
  210.           your form(s).  You can now cut/paste and edit the form as text.
  211.           In case you are wondering, the fix is not enabled by default because
  212.           I know MANY of you don't read this information until after you've
  213.           tried playing around with it in the IDE.  I didn't want to break
  214.           everyone's code:  form's won't even load at all if they have an old
  215.           version of the component on them.  :(
  216.           Many appologies for letting this one slip past me.
  217.           I will phase out the $DEFINE in the next version, so please don't
  218.           put off making this change any longer than you have to.
  219.         + Selection palette is now taskbar aware.  That is, if the palette would
  220.           be partially covered by a non-autohide task bar, it now repositions
  221.           itself to avoid this.  It also does the same if would be partially
  222.           obscured because it is to close to the left or right edge of the
  223.           screen.
  224.         + Delphi 2, 3 and C++B version has a new property: Flat.  Works like
  225.           the toolbar button's Flat property.  If someone REALLY needs this
  226.           property for Delphi 1, I'll look into adding it.
  227.         + Fixed problem where palette wasn't visible if the button was on a
  228.           fsTopMost FormStyle form.
  229.  1.71   + Renamed main unit ColorBtn.pas to DFSClrBn.pas to avoid conflict
  230.           with an existing unit from another author.  You will need to modify
  231.           the uses clauses in your units that use ColorBtn.  Sorry.
  232.  1.70   + Added OtherBtnCaption property to allow you to change the caption
  233.           of the "Other" button that appears on the color palette.  Good for
  234.           folks who don't want English text on their buttons (oops).  Thanks
  235.           to Kerstin Thaler <MuK.Thaler@t-online.de> for this.
  236.         + OtherColor property was never set to the palette, only retrieved.
  237.  1.66   + Fixed problem with the arrow not drawing correctly on some machines.
  238.           I don't know what is causing it, but I've switched over to using a
  239.           bitmap so it shouldn't be a problem any more.  The ARROW_DRAWING_BUG
  240.           define no longer exists.
  241.  1.65   + Added OnColorChange event.
  242.         + One person has reported that the arrow on the button does not appear
  243.           to be drawn correctly.  I can not duplicate this problem, but if the
  244.           arrow appears incorrectly for you, try enabling ARROW_DRAWING_BUG
  245.           define at the top of COLORBTN.PAS.
  246.  1.60   + Upgraded the property editor for PaletteColors and CustomColors so
  247.           that it supports multiple selections.
  248.         + Updated for new DFS.INC file, component tab name, history/comments
  249.           file.
  250.  1.50:  + Added published properties PaletteColors and CustomColors, and
  251.           a property editor so they can be set at design time.
  252.         + Added automatic saving of custom colors (the ones the user sets in
  253.           the dialog).  Just fill in the CustomColorsKey (D2/D3) or the
  254.           CustomColorsINI (D1).  Leave it blank to not save them.
  255.  1.00:  + Initial release.
  256.