📄 dfsclrbn.txt
字号:
component, property editors, etc.) are contained in this unit. This
was done for two primary reasons: 1) Using the component in a Delphi
or C++Builder expert would register the component as well. 2) Reduce
code size in some cases -- usually the smart linker removes this sort
of stuff since the app never references it, but now it's for certain
since it isn't even in the unit. This change means that you need to
install the component using the new "registration" unit instead of
the unit containing the component.
2.53 + Moved hard-coded strings to resourcestrings for Delphi/Builder 3 and
higher. They are normal consts for older compilers. This aids in
internationalizing an app.
2.52 + The form that owns the button no longer appears to be inactive when
the color palette is displayed. I'm using FlashWindow to fool
Windows into showing the form's caption bar in the active state.
Many thanks to AISSSoft@aol.com for this idea.
2.51 + Minor update for Delphi 4 compatibility.
2.50 + Added CycleColors property. If set, clicking on the color portion of
the button will cycle to the next palette color, and clicking on the
arrow portion will drop down the palette. If not set, it functions
as before, dropping the palette no matter where it was clicked.
+ Flat buttons (Win32 only) look more like they do in IE4. Doesn't have
as hard of an edge on it now.
+ Clicking the button while the color palette is displayed will now hide
the color palette instead of redisplaying it.
+ Flat buttons (Win32 only) now draw as if they were selected at
design-time. Behaves more like standard flat speed/toolbar buttons.
+ OtherColor property value could get reset during execution.
+ Added public property IgnoreTopmosts. If you set this to TRUE, the
calls to NormalizeTopMosts and RestoreTopmosts will NOT be made.
Normally, these calls should be fine, but I have had some reports of
strange things going on with window z-orders being changed around and
I suspect these calls might be doing it. If you aren't experiencing
anything like this, you can safely ignore this property.
+ Added ShowColorHints property and related OnGetColorHintText event.
Setting this property causes the color palette to show a hint for
each color square that displays the RGB value of the color. For
example, then hint for a white square would be 'RGB = 255 255 255'.
This hint string can be modified via the OnGetColorHintText event.
This event is passed the TColor that needs a hint, the X, Y index into
the palette color array (not the X,Y cursor position) where 0,0 is the
"other" color, and a var string parameter to put the hint text in.
This string initially will contain the default hint text, and setting
it to an empty string ('') will prevent the hint from showing at all.
2.11 + Added Version property.
2.10 + 32-bit version now has a keyboard interface. Works as you would
expect: left, right, up and down keys move around. Won't work in
Delphi 1 because of a VCL bug that insists on focusing the "Other"
button. D2, D3, C1 and C3 do not have this problem.
2.01 + Fixed CustomColors property editor. It was not wide enough for all
of the color boxes.
+ Fixed internal compiler error when compiled under C++Builder 1 with
Pascal compiler options enabled.
+ Fixed problem with C++Builder 3 run-time packages.
2.00 + The "stream read error" fix broke something else; PaletteColors and
CustomColors properties would never write updated data, so any changes
you made to them at design-time would be lost if you viewed them as
text or closed the form. I've REALLY fixed it this time, but I've
broken previous versions because the streaming mechanism changed
again (for the LAST time, NEVER AGAIN, I promise). Make sure you
read the README.NOW file if you are upgrading from a previous version.
+ There was no visual indication if the button was disabled (Enabled
property set to false). The color box is now "shaded" out and the
drop down arrow is gray.
+ Added work-around for a bug in the Delphi 2 compiler. With
optimizations enabled, the DrawItem method would not compile. I've
selectively turned off compiler optimization for that routine if you
are compiling under Delphi 2.
+ Framing rectangles in the color palette were not using system defined
3D colors. The also suffered from the LineTo problem that the drop
down arrow used to. Thanks to J. C. Kiran <jace@radiolink.net> for
this one.
+ Fixed problem with EnumObjects call causing GPFs under Delphi 1.
Thanks go to Bruno Sonnino <sonnino@netmogi.com.br> for this one.
1.80 + Fixed the "stream read error" when trying to copy the component or
edit a form containing it as text. Unfortunately, this makes it
incompatible with previous versions of the component. You will have
to manually remove any TdfsColorButton components you have on your
forms. Next, open the CBtnForm.pas file and remove the period from
the first line so that it reads:
{$DEFINE FIX_STREAM_ERROR}
Now recompile the component into Delphi and re-add the component to
your form(s). You can now cut/paste and edit the form as text.
In case you are wondering, the fix is not enabled by default because
I know MANY of you don't read this information until after you've
tried playing around with it in the IDE. I didn't want to break
everyone's code: form's won't even load at all if they have an old
version of the component on them. :(
Many appologies for letting this one slip past me.
I will phase out the $DEFINE in the next version, so please don't
put off making this change any longer than you have to.
+ Selection palette is now taskbar aware. That is, if the palette would
be partially covered by a non-autohide task bar, it now repositions
itself to avoid this. It also does the same if would be partially
obscured because it is to close to the left or right edge of the
screen.
+ Delphi 2, 3 and C++B version has a new property: Flat. Works like
the toolbar button's Flat property. If someone REALLY needs this
property for Delphi 1, I'll look into adding it.
+ Fixed problem where palette wasn't visible if the button was on a
fsTopMost FormStyle form.
1.71 + Renamed main unit ColorBtn.pas to DFSClrBn.pas to avoid conflict
with an existing unit from another author. You will need to modify
the uses clauses in your units that use ColorBtn. Sorry.
1.70 + Added OtherBtnCaption property to allow you to change the caption
of the "Other" button that appears on the color palette. Good for
folks who don't want English text on their buttons (oops). Thanks
to Kerstin Thaler <MuK.Thaler@t-online.de> for this.
+ OtherColor property was never set to the palette, only retrieved.
1.66 + Fixed problem with the arrow not drawing correctly on some machines.
I don't know what is causing it, but I've switched over to using a
bitmap so it shouldn't be a problem any more. The ARROW_DRAWING_BUG
define no longer exists.
1.65 + Added OnColorChange event.
+ One person has reported that the arrow on the button does not appear
to be drawn correctly. I can not duplicate this problem, but if the
arrow appears incorrectly for you, try enabling ARROW_DRAWING_BUG
define at the top of COLORBTN.PAS.
1.60 + Upgraded the property editor for PaletteColors and CustomColors so
that it supports multiple selections.
+ Updated for new DFS.INC file, component tab name, history/comments
file.
1.50: + Added published properties PaletteColors and CustomColors, and
a property editor so they can be set at design time.
+ Added automatic saving of custom colors (the ones the user sets in
the dialog). Just fill in the CustomColorsKey (D2/D3) or the
CustomColorsINI (D1). Leave it blank to not save them.
1.00: + Initial release.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -