AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Button hinzufügen JInspector

Ein Thema von EWeiss · begonnen am 8. Sep 2008 · letzter Beitrag vom 8. Sep 2008
 
jbg

Registriert seit: 12. Jun 2002
3.485 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2

Re: Button hinzufügen JInspector

  Alt 8. Sep 2008, 11:20
Das hier habe ich mal schnell zusammengeschrieben (=zusammenkopiert)
Delphi-Quellcode:
type
  TJvInspectorPictureItem = class(TJvCustomInspectorItem)
  protected
    function GetDisplayValue: string; override;
    procedure Edit; override;
  public
    constructor Create(const AParent: TJvCustomInspectorItem; const AData: TJvCustomInspectorData); override;
  end;


constructor TJvInspectorPictureItem .Create(const AParent: TJvCustomInspectorItem;
  const AData: TJvCustomInspectorData);
begin
  inherited Create(AParent, AData);
  Flags := Flags + [iifEditButton, iifEditFixed];
end;

function TJvInspectorPictureItem.GetDisplayValue: string;
begin
  if TPicture(Data.AsOrdinal).IsEmpty then
    Result := '(kein Bild)'
  else
    Result := '(Bild)';
end;

procedure TJvInspectorMacroItem.Edit;
var
  Pic: TPicture;
begin
  Pic := TPicture(Data.AsOrdinal);
  ShowPictureEditor(Pic);
end;


initialization
  TJvCustomInspectorData.ItemRegister.Add(TJvInspectorTypeInfoRegItem.Create(TJvInspectorPictureItem , TypeInfo(TPicture)));
end.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz