From b68b54ede9c34aa6c734b943e334885e46682cfc Mon Sep 17 00:00:00 2001 From: lazarus Date: Sun, 18 Aug 2002 04:56:54 +0000 Subject: [PATCH] AJ: Partial HintWindow Fix; Added Screen.Font & Font.Name PropEditor; Started to fix ComboBox DropDown size/pos git-svn-id: trunk@2708 - --- designer/graphpropedits.pas | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/designer/graphpropedits.pas b/designer/graphpropedits.pas index 5787d3ec15..96a16e4d11 100644 --- a/designer/graphpropedits.pas +++ b/designer/graphpropedits.pas @@ -71,6 +71,12 @@ type AState:TPropEditDrawState); override; end; + TFontNamePropertyEditor = class(TStringPropertyEditor) + public + function GetAttributes: TPropertyAttributes; override; + procedure GetValues(Proc: TGetStringProc); override; + end; + { TBrushStylePropertyEditor PropertyEditor editor for TBrush's Style. Simply provides for custom render. } @@ -619,6 +625,19 @@ begin inherited SetValue(NewValue); end; +function TFontNamePropertyEditor.GetAttributes: TPropertyAttributes; +begin + Result := [paMultiSelect, paValueList, paRevertable]; +end; + +procedure TFontNamePropertyEditor.GetValues(Proc: TGetStringProc); +var + I: Integer; +begin + for I := 0 to Screen.Fonts.Count -1 do + Proc(Screen.Fonts[I]); +end; + { TBrushStylePropertyEditor } procedure TBrushStylePropertyEditor.PropDrawValue(ACanvas: TCanvas; @@ -783,7 +802,7 @@ initialization RegisterPropertyEditor(ClassTypeInfo(TFont), nil,'',TFontPropertyEditor); RegisterPropertyEditor(ClassTypeInfo(TGraphic), nil,'',TGraphicPropertyEditor); RegisterPropertyEditor(ClassTypeInfo(TPicture), nil,'',TPicturePropertyEditor); - + RegisterPropertyEditor(DummyClassForPropTypes.PTypeInfos('AnsiString'), TFont,'Name', TFontNamePropertyEditor); RegisterPropertyEditor(ClassTypeInfo(TBitmap), TSpeedButton,'Glyph', TButtonGlyphPropEditor); RegisterPropertyEditor(ClassTypeInfo(TBitmap), TBitBtn,'Glyph',