2
*****************************************************************************
3
See the file COPYING.modifiedLGPL.txt, included in this distribution,
4
for details about the license.
5
*****************************************************************************
7
Author: Andrew Johnson, Mattias Gaertner
10
This units defines the property editors for graphic types.
19
Classes, TypInfo, SysUtils, LCLProc, Forms, Controls, LCLType, GraphType,
20
FileUtil, Graphics, StdCtrls, Buttons, ComCtrls, Menus, ExtCtrls, Dialogs,
21
LCLIntf, ExtDlgs, PropEdits, PropEditUtils, ImgList, Math,
22
GraphicPropEdit; // defines TGraphicPropertyEditorForm
25
{ TGraphicPropertyEditor
26
The default property editor for all TGraphic's and sub types (e.g. TBitmap,
27
TPixmap, TIcon, etc.). }
29
TGraphicPropertyEditor = class(TClassPropertyEditor)
31
procedure Edit; override;
32
function GetAttributes: TPropertyAttributes; override;
35
{ TPicturePropertyEditor
36
The default property editor for TPicture}
38
TPicturePropertyEditor = class(TGraphicPropertyEditor)
40
procedure Edit; override;
43
{ TButtonGlyphPropEditor
44
The default property editor for the Glyphs of TSpeedButton and TBitBtn }
45
TButtonGlyphPropEditor = class(TGraphicPropertyEditor)
47
procedure Edit; override;
50
{ TColorPropertyEditor
51
PropertyEditor editor for the TColor type. Displays the color as a clXXX value
52
if one exists, otherwise displays the value as hex. Also allows the
53
clXXX value to be picked from a list. }
55
TColorPropertyEditor = class(TIntegerPropertyEditor)
57
procedure Edit; override;
58
function GetAttributes: TPropertyAttributes; override;
59
function OrdValueToVisualValue(OrdValue: longint): string; override;
60
procedure GetValues(Proc: TGetStrProc); override;
61
procedure SetValue(const NewValue: ansistring); override;
62
procedure ListMeasureWidth(const CurValue: ansistring; Index: integer;
63
ACanvas: TCanvas; var AWidth: Integer); override;
64
procedure ListDrawValue(const CurValue: ansistring; Index: integer;
65
ACanvas: TCanvas; const ARect:TRect; AState: TPropEditDrawState); override;
66
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
67
AState: TPropEditDrawState); override;
70
{ TBrushStylePropertyEditor
71
PropertyEditor editor for TBrush's Style. Provides custom render. }
73
TBrushStylePropertyEditor = class(TEnumPropertyEditor)
75
function GetAttributes: TPropertyAttributes; override;
76
procedure ListMeasureWidth(const CurValue: ansistring; Index:integer;
77
ACanvas: TCanvas; var AWidth: Integer); override;
78
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
79
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
80
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
81
AState: TPropEditDrawState); override;
84
{ TPenStylePropertyEditor
85
PropertyEditor editor for TPen's Style. Simply provides custom render. }
87
TPenStylePropertyEditor = class(TEnumPropertyEditor)
89
function GetAttributes: TPropertyAttributes; override;
90
procedure ListMeasureWidth(const CurValue: ansistring; Index:integer;
91
ACanvas: TCanvas; var AWidth: Integer); override;
92
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
93
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
94
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
95
AState:TPropEditDrawState); override;
99
PropertyEditor editor for the Font property.
100
Brings up the font dialog as well as allowing the properties of the object to
103
TFontPropertyEditor = class(TClassPropertyEditor)
105
procedure Edit; override;
106
function GetAttributes: TPropertyAttributes; override;
109
{ TFontNamePropertyEditor
110
PropertyEditor editor for TFont.Name. Simply provides listing font names. }
112
TFontNamePropertyEditor = class(TStringPropertyEditor)
114
function GetAttributes: TPropertyAttributes; override;
115
procedure GetValues(Proc: TGetStrProc); override;
118
{ TFontCharsetPropertyEditor
119
PropertyEditor editor for the TFontCharset properties.
120
Displays Charset as constant name if exists, otherwise an integer. }
122
TFontCharsetPropertyEditor = class(TIntegerPropertyEditor)
124
function GetAttributes: TPropertyAttributes; override;
125
function OrdValueToVisualValue(OrdValue: longint): string; override;
126
procedure GetValues(Proc: TGetStrProc); override;
127
procedure SetValue(const NewValue: ansistring); override;
130
{ TImageIndexPropertyEditor
131
PropertyEditor editor for ImageIndex. Provides list of glyphs. }
133
TImageIndexPropertyEditor = class(TIntegerPropertyEditor)
135
function GetImageList: TCustomImageList; virtual;
137
function GetAttributes: TPropertyAttributes; override;
138
procedure GetValues(Proc: TGetStrProc); override;
139
procedure ListMeasureHeight(const AValue: ansistring; Index:integer;
140
ACanvas:TCanvas; var AHeight: Integer); override;
141
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
142
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
145
//==============================================================================
146
// Delphi Compatible Property Editor Classnames
149
TFontNameProperty = TFontNamePropertyEditor;
150
//TFontCharsetProperty = TFontCharsetPropertyEditor;
151
TColorProperty = TColorPropertyEditor;
152
TBrushStyleProperty = TBrushStylePropertyEditor;
153
TPenStyleProperty = TPenStylePropertyEditor;
154
TFontProperty = TFontPropertyEditor;
158
{ TGraphicPropertyEditor }
160
procedure TGraphicPropertyEditor.Edit;
162
TheDialog: TGraphicPropertyEditorForm;
164
FreeGraphic: Boolean;
166
AGraphic := TGraphic(GetObjectValue(TGraphic));
167
TheDialog := TGraphicPropertyEditorForm.Create(nil);
170
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
171
if (AGraphic <> nil) then
172
TheDialog.Graphic := AGraphic;
174
if (TheDialog.ShowModal = mrOK) and TheDialog.Modified then
176
if (TheDialog.Graphic <> nil) and (not TheDialog.Graphic.Empty) then
178
if AGraphic = nil then
180
AGraphic := TGraphicClass(GetTypeData(GetPropType)^.ClassType).Create;
184
AGraphic.Assign(TheDialog.Graphic);
186
if (AGraphic.ClassType = TheDialog.Graphic.ClassType)
187
and not AGraphic.Equals(TheDialog.Graphic) then
189
if (TheDialog.FileName <> '') and FileExistsUTF8(TheDialog.FileName) then
191
AGraphic.LoadFromFile(TheDialog.FileName);
192
//MessageDlg('Differences detected, file reloaded', mtInformation, [mbOK], 0);
195
//MessageDlg('Image may be different', mtWarning, [mbOK], 0);
198
SetPtrValue(AGraphic);
201
if AGraphic <> nil then
212
function TGraphicPropertyEditor.GetAttributes: TPropertyAttributes;
214
Result := [paDialog, paRevertable, paReadOnly];
217
{ TPicturePropertyEditor }
219
procedure TPicturePropertyEditor.Edit;
221
procedure AddPackage(Picture: TPicture);
223
if Picture.Graphic=nil then exit;
224
//DebugLn(['AddPackage ',dbgsname(Picture.Graphic)]);
225
GlobalDesignHook.AddDependency(Picture.Graphic.ClassType,'');
229
TheDialog: TGraphicPropertyEditorForm;
232
Picture := TPicture(GetObjectValue(TPicture));
233
TheDialog := TGraphicPropertyEditorForm.Create(nil);
235
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
236
if (Picture.Graphic <> nil) then
237
TheDialog.Graphic := Picture.Graphic;
238
if (TheDialog.ShowModal = mrOK) and TheDialog.Modified then
240
if TheDialog.Graphic <> nil then
242
Picture.Graphic := TheDialog.Graphic;
243
if not Picture.Graphic.Equals(TheDialog.Graphic) then
245
if (TheDialog.FileName <> '') and FileExistsUTF8(TheDialog.FileName) then
247
Picture.LoadFromFile(TheDialog.FileName);
248
//MessageDlg('Differences detected, file reloaded', mtInformation, [mbOK], 0);
251
//MessageDlg('Image may be different', mtWarning, [mbOK], 0);
256
Picture.Graphic := nil;
264
{ TButtonGlyphPropEditor }
266
procedure TButtonGlyphPropEditor.Edit;
268
TheDialog: TGraphicPropertyEditorForm;
271
ABitmap := TBitmap(GetObjectValue(TBitmap));
272
TheDialog := TGraphicPropertyEditorForm.Create(nil);
274
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
275
if not ABitmap.Empty then
276
TheDialog.Graphic := ABitmap;
277
if (TheDialog.ShowModal = mrOK) and TheDialog.Modified then
279
ABitmap.Assign(TheDialog.Graphic);
287
{ TColorPropertyEditor }
289
procedure TColorPropertyEditor.Edit;
291
ColorDialog: TColorDialog;
293
ColorDialog := TColorDialog.Create(nil);
295
ColorDialog.Color := GetOrdValue;
296
if ColorDialog.Execute then
297
SetOrdValue(ColorDialog.Color);
303
function TColorPropertyEditor.GetAttributes: TPropertyAttributes;
305
Result := [paMultiSelect,paDialog,paValueList,paCustomDrawn,paRevertable];
306
if GetDefaultOrdValue <> NoDefaultValue then
307
Result := Result + [paHasDefaultValue];
310
function TColorPropertyEditor.OrdValueToVisualValue(OrdValue: longint): string;
312
Result := ColorToString(TColor(OrdValue));
315
procedure TColorPropertyEditor.GetValues(Proc: TGetStrProc);
319
if not IdentToColor(GetVisualValue, CValue) then Proc(GetVisualValue);
320
GetColorValues(Proc);
323
procedure TColorPropertyEditor.PropDrawValue(ACanvas:TCanvas; const ARect:TRect;
324
AState:TPropEditDrawState);
326
if GetVisualValue <> '' then
327
ListDrawValue(GetVisualValue, -1, ACanvas, ARect, [pedsInEdit])
329
inherited PropDrawValue(ACanvas, ARect, AState);
332
procedure TColorPropertyEditor.ListDrawValue(const CurValue:ansistring;
333
Index:integer; ACanvas:TCanvas; const ARect:TRect;
334
AState: TPropEditDrawState);
336
function ColorToBorderColor(AColor: TColorRef): TColor;
345
if (TColorQuad(AColor).Red > 192) or
346
(TColorQuad(AColor).Green > 192) or
347
(TColorQuad(AColor).Blue > 192) then
350
if pedsInEdit in AState then
352
if pedsSelected in AState then
355
Result := TColor(AColor);
358
if pedsSelected in AState then
359
Result := clHighlight
365
vRight, vBottom: Integer;
366
vOldPenColor, vOldBrushColor: TColor;
367
vOldPenStyle: TPenStyle;
369
vRight := (ARect.Bottom - ARect.Top) + ARect.Left - 2;
370
vBottom:=ARect.Bottom-2;
374
vOldPenStyle := Pen.Style;
375
vOldPenColor := Pen.Color;
376
vOldBrushColor := Brush.Color;
379
if pedsInEdit in AState then
381
if pedsSelected in AState then
382
Brush.Color := clWindow
384
Brush.Color := ACanvas.Brush.Color;
388
if pedsSelected in AState then
389
Brush.Color := clHighlightText
391
Brush.Color := clWindow;
393
Pen.Color := Brush.Color;
394
Pen.Style := psSolid;
396
Rectangle(ARect.Left, ARect.Top, vRight, vBottom);
398
// set things up and do the work
399
Brush.Color := StringToColorDef(CurValue,clNone);
400
Pen.Color := ColorToBorderColor(ColorToRGB(Brush.Color));
401
Rectangle(ARect.Left + 1, ARect.Top + 1, vRight - 1, vBottom - 1);
403
// restore the things we twiddled with
404
Brush.Color := vOldBrushColor;
405
Pen.Color := vOldPenColor;
406
Pen.Style := vOldPenStyle;
408
inherited ListDrawValue(CurValue, Index, ACanvas,
409
Rect(vRight, ARect.Top, ARect.Right, ARect.Bottom),
413
procedure TColorPropertyEditor.ListMeasureWidth(const CurValue:ansistring;
414
Index:integer; ACanvas:TCanvas; var AWidth:Integer);
416
AWidth := ACanvas.TextWidth('clGradientInactiveCaption')+25;
419
procedure TColorPropertyEditor.SetValue(const NewValue: ansistring);
423
if IdentToColor(NewValue, CValue) then
426
inherited SetValue(NewValue);
429
function TFontNamePropertyEditor.GetAttributes: TPropertyAttributes;
431
Result := [paMultiSelect, paValueList, paRevertable];
434
procedure TFontNamePropertyEditor.GetValues(Proc: TGetStrProc);
438
for I := 0 to Screen.Fonts.Count -1 do
439
Proc(Screen.Fonts[I]);
442
{ TFontCharsetPropertyEditor }
444
function TFontCharsetPropertyEditor.GetAttributes: TPropertyAttributes;
446
Result:=[paMultiSelect,paSortList,paValueList,paRevertable,paHasDefaultValue];
449
function TFontCharsetPropertyEditor.OrdValueToVisualValue(OrdValue: longint
452
Result := CharsetToString(OrdValue);
455
procedure TFontCharsetPropertyEditor.GetValues(Proc: TGetStrProc);
457
proc(CharsetToString(ANSI_CHARSET));
458
proc(CharsetToString(DEFAULT_CHARSET));
459
proc(CharsetToString(SYMBOL_CHARSET));
460
proc(CharsetToString(MAC_CHARSET));
461
proc(CharsetToString(SHIFTJIS_CHARSET));
462
proc(CharsetToString(HANGEUL_CHARSET));
463
proc(CharsetToString(JOHAB_CHARSET));
464
proc(CharsetToString(GB2312_CHARSET));
465
proc(CharsetToString(CHINESEBIG5_CHARSET));
466
proc(CharsetToString(GREEK_CHARSET));
467
proc(CharsetToString(TURKISH_CHARSET));
468
proc(CharsetToString(VIETNAMESE_CHARSET));
469
proc(CharsetToString(HEBREW_CHARSET));
470
proc(CharsetToString(ARABIC_CHARSET));
471
proc(CharsetToString(BALTIC_CHARSET));
472
proc(CharsetToString(RUSSIAN_CHARSET));
473
proc(CharsetToString(THAI_CHARSET));
474
proc(CharsetToString(EASTEUROPE_CHARSET));
475
proc(CharsetToString(OEM_CHARSET));
476
proc(CharsetToString(FCS_ISO_10646_1));
479
procedure TFontCharsetPropertyEditor.SetValue(const NewValue: ansistring);
483
if not SameText(NewValue, 'DEFAULT_CHARSET') then
485
CValue := StringToCharset(NewValue);
486
if CValue = DEFAULT_CHARSET then
487
inherited SetValue(NewValue)
492
SetOrdValue(DEFAULT_CHARSET);
495
{ TBrushStylePropertyEditor }
497
procedure TBrushStylePropertyEditor.PropDrawValue(ACanvas: TCanvas;
498
const ARect: TRect; AState:TPropEditDrawState);
500
if GetVisualValue <> '' then
501
ListDrawValue(GetVisualValue, -1, ACanvas, ARect, [pedsInEdit])
503
inherited PropDrawValue(ACanvas, ARect, AState);
506
procedure TBrushStylePropertyEditor.ListDrawValue(const CurValue: ansistring;
507
Index:integer; ACanvas: TCanvas; const ARect: TRect; AState:TPropEditDrawState);
509
vRight, vBottom: Integer;
510
vOldPenColor, vOldBrushColor: TColor;
511
vOldBrushStyle: TBrushStyle;
513
vRight := (ARect.Bottom - ARect.Top) {* 2} + ARect.Left -2;
514
vBottom:= ARect.Bottom-2;
518
vOldPenColor := Pen.Color;
519
vOldBrushColor := Brush.Color;
520
vOldBrushStyle := Brush.Style;
523
Pen.Color := Brush.Color;
524
Brush.Color := clWindow;
525
Rectangle(ARect.Left, ARect.Top, vRight, vBottom);
528
Pen.Color := clWindowText;
529
Brush.Style := TBrushStyle(GetEnumValue(GetPropInfo^.PropType, CurValue));
532
if Brush.Style = bsClear then begin
533
Brush.Color := clWindow;
534
Brush.Style := bsSolid;
537
Brush.Color := clWindowText;
539
// ok on with the show
540
Rectangle(ARect.Left + 1, ARect.Top + 1, vRight - 1, vBottom - 1);
542
// restore the things we twiddled with
543
Brush.Color := vOldBrushColor;
544
Brush.Style := vOldBrushStyle;
545
Pen.Color := vOldPenColor;
547
inherited ListDrawValue(CurValue, Index, ACanvas,
548
Rect(vRight, ARect.Top, ARect.Right, ARect.Bottom),
553
function TBrushStylePropertyEditor.GetAttributes: TPropertyAttributes;
555
Result:=(inherited GetAttributes)-[paHasDefaultValue]+[paCustomDrawn];
558
procedure TBrushStylePropertyEditor.ListMeasureWidth(const CurValue: ansistring;
559
Index:integer; ACanvas: TCanvas; var AWidth: Integer);
564
{ TPenStylePropertyEditor }
566
procedure TPenStylePropertyEditor.PropDrawValue(ACanvas: TCanvas;
567
const ARect: TRect; AState:TPropEditDrawState);
569
if GetVisualValue <> '' then
570
ListDrawValue(GetVisualValue, -1, ACanvas, ARect, [pedsInEdit])
572
inherited PropDrawValue(ACanvas, ARect, AState);
575
procedure TPenStylePropertyEditor.ListDrawValue(const CurValue: ansistring;
576
Index:integer; ACanvas: TCanvas;
577
const ARect: TRect; AState:TPropEditDrawState);
579
vRight, vTop, vBottom: Integer;
580
vOldPenColor, vOldBrushColor: TColor;
581
vOldPenStyle: TPenStyle;
584
vRight := (ARect.Bottom - ARect.Top) * 2 + ARect.Left;
585
vTop := (ARect.Bottom - ARect.Top) div 2 + ARect.Top;
586
vBottom := ARect.Bottom-2;
590
vOldPenColor := Pen.Color;
591
vOldBrushColor := Brush.Color;
592
vOldPenStyle := Pen.Style;
595
Pen.Color := Brush.Color;
596
Rectangle(ARect.Left, ARect.Top, vRight, vBottom);
598
// white out the background
599
Pen.Color := clWindowText;
600
Brush.Color := clWindow;
601
Rectangle(ARect.Left + 1, ARect.Top + 1, vRight - 1, vBottom - 1);
603
// set thing up and do work
604
Pen.Color := clWindowText;
605
i:=GetEnumValue(GetPropInfo^.PropType, CurValue);
606
Pen.Style := TPenStyle(i);
607
MoveTo(ARect.Left + 1, vTop);
608
LineTo(vRight - 1, vTop);
609
MoveTo(ARect.Left + 1, vTop + 1);
610
LineTo(vRight - 1, vTop + 1);
612
// restore the things we twiddled with
613
Brush.Color := vOldBrushColor;
614
Pen.Style := vOldPenStyle;
615
Pen.Color := vOldPenColor;
617
inherited ListDrawValue(CurValue, -1, ACanvas,
618
Rect(vRight, ARect.Top, ARect.Right, ARect.Bottom),
623
function TPenStylePropertyEditor.GetAttributes: TPropertyAttributes;
625
Result:=(inherited GetAttributes)-[paHasDefaultValue]+[paCustomDrawn];
628
procedure TPenStylePropertyEditor.ListMeasureWidth(const CurValue: ansistring;
629
Index:integer; ACanvas: TCanvas; var AWidth: Integer);
634
{ TFontPropertyEditor }
636
procedure TFontPropertyEditor.Edit;
637
var FontDialog: TFontDialog;
639
FontDialog := TFontDialog.Create(nil);
641
FontDialog.Font := TFont(GetObjectValue(TFont));
642
FontDialog.Options := FontDialog.Options + [fdShowHelp, fdForceFontExist];
643
if FontDialog.Execute then
644
SetPtrValue(FontDialog.Font);
650
function TFontPropertyEditor.GetAttributes: TPropertyAttributes;
652
Result := [paMultiSelect, paSubProperties, paDialog, paReadOnly];
656
//------------------------------------------------------------------------------
658
{ TImageIndexPropertyEditor }
660
function TImageIndexPropertyEditor.GetImageList: TCustomImageList;
662
Persistent: TPersistent;
663
Component: TComponent absolute Persistent;
668
Persistent := GetComponent(0);
669
if not (Persistent is TComponent) then
672
if Component is TMenuItem then
674
Component := Component.GetParentComponent;
675
while (Component <> nil) do
677
if (Component is TMenuItem) and (TMenuItem(Component).SubMenuImages <> nil) then
678
Exit(TMenuItem(Component).SubMenuImages);
679
if (Component is TMenu) then
680
Exit(TMenu(Component).Images);
681
Component := Component.GetParentComponent;
686
Component := Component.GetParentComponent;
687
if Component = nil then
689
PropInfo := TypInfo.GetPropInfo(Component, 'Images');
690
if PropInfo = nil then
692
Obj := GetObjectProp(Component, PropInfo);
693
if Obj is TCustomImageList then
694
Exit(TCustomImageList(Obj));
698
function TImageIndexPropertyEditor.GetAttributes: TPropertyAttributes;
700
Result := [paValueList, paCustomDrawn, paRevertable];
701
if GetDefaultOrdValue <> NoDefaultValue then
702
Result := Result + [paHasDefaultValue];
705
procedure TImageIndexPropertyEditor.GetValues(Proc: TGetStrProc);
707
Images: TCustomImageList;
710
Proc(IntToStr(GetDefaultOrdValue));
711
Images := GetImageList;
712
if Assigned(Images) then
713
for I := 0 to Images.Count - 1 do
717
procedure TImageIndexPropertyEditor.ListMeasureHeight(const AValue: ansistring;
718
Index: integer; ACanvas: TCanvas; var AHeight: Integer);
720
Images: TCustomImageList;
722
AHeight := ACanvas.TextHeight('1');
723
Images := GetImageList;
724
if Assigned(Images) then
725
AHeight := Max(AHeight, Images.Height + 2);
728
procedure TImageIndexPropertyEditor.ListDrawValue(const CurValue: ansistring;
729
Index: integer; ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState);
731
Images: TCustomImageList;
736
Images := GetImageList;
738
if Assigned(Images) then
740
if (pedsInComboList in AState) and not (pedsInEdit in AState) then
742
OldColor := ACanvas.Brush.Color;
743
if pedsSelected in AState then
744
ACanvas.Brush.Color := clHighlight
746
ACanvas.Brush.Color := clWhite;
748
ACanvas.Brush.Color := OldColor;
751
Images.Draw(ACanvas, R.Left + 1, R.Top + 1, Index, True);
752
R.Left := R.Left + Images.Width + 2;
754
inherited ListDrawValue(CurValue, Index, ACanvas, R, AState);
758
RegisterPropertyEditor(TypeInfo(TGraphicsColor), nil, '', TColorPropertyEditor);
759
RegisterPropertyEditor(TypeInfo(TPenStyle), nil, '', TPenStylePropertyEditor);
760
RegisterPropertyEditor(TypeInfo(TBrushStyle), nil, '', TBrushStylePropertyEditor);
761
RegisterPropertyEditor(TypeInfo(AnsiString), TFont, 'Name', TFontNamePropertyEditor);
762
RegisterPropertyEditor(TypeInfo(TFontCharset), nil, 'CharSet', TFontCharsetPropertyEditor);
763
RegisterPropertyEditor(TypeInfo(TImageIndex), TComponent, 'ImageIndex', TImageIndexPropertyEditor);
764
RegisterPropertyEditor(ClassTypeInfo(TFont), nil,'',TFontPropertyEditor);
765
RegisterPropertyEditor(ClassTypeInfo(TGraphic), nil,'',TGraphicPropertyEditor);
766
RegisterPropertyEditor(ClassTypeInfo(TPicture), nil,'',TPicturePropertyEditor);
767
RegisterPropertyEditor(ClassTypeInfo(TBitmap), TSpeedButton,'Glyph', TButtonGlyphPropEditor);
768
RegisterPropertyEditor(ClassTypeInfo(TBitmap), TBitBtn,'Glyph', TButtonGlyphPropEditor);