CADCombo

所属分类:绘图程序
开发工具:C++ Builder
文件大小:22KB
下载次数:7
上传日期:2008-02-12 19:21:55
上 传 者zhouqinglun
说明:  CADBOXES 1.1 as of 30.10.1998 (C)1998 by Bernhard Knibbe This Component is a enhanced listbox/combobox like seen on a famous cad program. Its rather useful to visualize/change/check boolean values related to stringlists. It is originally based on the SKDLIST.ZIP by robert@alpine.net You can add up to 8 "toggle" bitmaps,stored in a TImageList.

文件列表:
CadBoxes.dcr (1372, 1998-10-30)
CadBoxes.dcu (11621, 1998-10-30)
CadBoxes.dfm (7466, 1998-10-30)
CadBoxes.inf (626, 1998-10-30)
CadBoxes.pas (15063, 1998-10-30)
Project1.dof (998, 1998-10-30)
Project1.dpr (188, 1998-10-30)
Project1.res (876, 1998-10-30)
Unit1.dfm (71564, 1998-10-30)
Unit1.pas (750, 1998-10-30)

CADBOXES 1.1 as of 30.10.19*** (C)19*** by Bernhard Knibbe This Component is a enhanced listbox/combobox like seen on a famous cad program. Its rather useful to visualize/change/check boolean values related to stringlists. It is originally based on the SKDLIST.ZIP by robert@alpine.net You can add up to 8 "toggle" bitmaps,stored in a TImageList. The indexes of the TImageList correspond to the index of the flags: 0 shown whenever a flag is false 1..8 shown in the corresponding column if the flag is true The flags of an item are stored as a byte in the loword of an attached object. With double clicking on any of the bitmaps, you can change their status. I know this description sucks ;-). Just test out by yourself. **************************** New properties: *************** Imagelist:Holds the bitmaps. The bitmap with index zero (0) will be seen if the according flag is set to false. Image 1..Image 7 are the images of the according flags. Note, that if property ShowEmptyFlags=false you wont see Bitmap Index 0! FlagCount:Here you select the number of toggle buttons (0..8). If this value is bigger than the maximum Imagelist index you wont see pictures there. ShowEmptyFlag:See above ToggleFlags:If set to false you cant change the flags with the mouse New Events: *********** OnFlagClick:Whenever you click on a bitmap, it toggles and this event is fired. New Procedures/functions: ************************* procedure AddEntry:Use this if you want to set an item and the flags at the same time If you use items.add(..) the value of the flags is not predictable function GetFlag(Index:integer;FlagNumber:byte):boolean Get the flag status of the given index. procedure SetFlag(Index:integer;Flagnumber:byte;Flag:boolean); Sets one single flag within the tstrings object. For further details look into the code. Just go down! **************************** To use the component: ********************* Drop a TImageList and fill it with bitmaps (do not use too big ones) Drop the CadListBox and fill the Imagelist property. Fill the Itemheight property according to the size of the bitmaps and your taste. Add strings programmatically with the AddEntry-procedure or via items.add(..). Check/Change the flags of the strings with the mouse or with Get/Setflag. Thats it. ***************************** (p)19*** by Bernhard Knibbe. History: 1.0 16.10.***: Basic functionality implemented. Originally released to the public domain. 1.1 Bugs removed: The left two images were always the same. Sorry for that! Exception caused by not assigning a TImageList at designtime Not assigning a TImageList will cause the Component to work as a normal List/Combo box New property: ToggleFlags (boolean): if set to false you cant do much with your mouse Added an example for easy understanding Improved documentation CadListBox and CadComboBox put into one file Improved handling of bigger fonts, but still not 100% satisfying. (As a workaround, double font.size and enter this value as ItemHeight with the CadComboBox) This components are freeware. If you like/use/dont like/misuse it just drop me a line Thanks to all who offer free components to the Public Domain! Bernhard Knibbe Vienna, Austria b_knibbe@csi.com http://ourworld.compuserve.com/homepages/b_knibbe Please report any bugs/problems/improvements!

近期下载者

相关文件


收藏者