ColorPicker

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:47KB
下载次数:2
上传日期:2013-05-29 14:27:19
上 传 者Santana
说明:  Windows Color Picker

文件列表:
ColorPicker\ColorPicker.dcr (492, 1999-06-16)
ColorPicker\ColorPicker.pas (120356, 2013-03-09)
ColorPicker\ColorPicker1.jpg (29407, 1999-06-16)
ColorPicker (0, 2013-05-26)

TColorPickerButton is a special speed button which can be used to let the user select a specific color. The control does not use the standard Windows color dialog, but uses a popup window very similar to the one in Office97, which has been improved a lot to support the task of picking one color out of millions. Included is also the ability to pick one of the predefined system colors (e.g. clBtnFace). TColorPickerButton works only with D4 and BCB! (BCB check by Josue Andrade Gomes gomesj@bsi.com.br) (c) 1999, written by Dipl. Ing. Mike Lischke (public@lischke-online.de) All rights reserved. This control is freeware and may be used in any software product (free or commercial) under the condition that I'm given proper credit (titel, name and eMail address in the documentation or the About box of the product this control is used in). Portions copyright by Borland. The implementation of the speed button has been taken from Delphi sources. The use of the new control is quite simple. Just install the ColorPickerButton.pas into your component palette. By default the target component page is "Tools". That's all. Here's a list of methods and properties which differ from TSpeedButton: public property DroppedDown: Boolean; Read to get the drop down state of the color popup or write to set it. published property CustomText: String; Determines the text of the second special button on the popup. If empty this button is neither shown nor is it then possible to select a color from the color comb. If set then the button is shown and the user can click on it to show the color comb (accelerator allowed). property DefaultText: String; Determines the text of the first special button on the popup. If empty this button is not shown, else it is used to select the default color (clDefault) (accelerator allowed). property DropDownArrowColor: TColor; Determines the color of the small triangle on the right of the button. property DropDownWidth: Integer; Determines the size of the area on the right which can be clicked to drop down the picker window. property IndicatorBorder: TIndicatorBorder; Set one of four border styles the color preview rectangle is drawn in (none, flat, sunken, raised) property PopupSpacing: Integer; Denotes the spacing within the color popup window (>= 0, this is the place left on the left and right side of the popup) property SelectionColor: TColor; Contains the currently selected color . property ShowSystemColors: Boolean; Determines whether predefined system colors like clBtnFace or clWindow should be shown. property OnChange: TNotifyEvent; Triggered when the selection color of the button changes. property OnDefaultSelect; Triggered when the user selected the default color (either with the mouse or by accelerator key). property OnDropChanged: TNotifyEvent; Triggered after the visibility state of the picker window has changed. DroppedDown is already set according to the state. property OnDropChanging: TDropChangingEvent; Triggered just before the visibility state of the picker window changes. DroppedDown is still in the old state and you can reject dropping down or hiding the window by setting Allowed to False. property OnHint: THintEvent; For each color in the picker window a hint window appears when the mouse is over the belonging button or comb. If the mouse is not over any button or hovers over the default text or the custom text, respectively, then a hint is requested from the application by this event. There's a Cell paramter to tell what cell is meant. It can be NoCell, CustomCell or DefaultCell. BTW: By setting ShowHint to False all hints are disabled, even those of the color and comb buttons. If you don't supply an OnHint event then the hint string of the color picker button is shown. As you can see there's nothing special with the control. Just use it and show the world what really amazing applications can be produced with Delphi. Have fun and Ciao, Mike

近期下载者

相关文件


收藏者