AGB  ·  Datenschutz  ·  Impressum  







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

Komponentenentwicklung LED über TShape ?

Ein Thema von Chris211183 · begonnen am 23. Sep 2013 · letzter Beitrag vom 16. Jun 2015
 
Chris211183

Registriert seit: 19. Sep 2013
Ort: Braunschweig
204 Beiträge
 
Delphi 6 Professional
 
#15

AW: Komponentenentwicklung LED über TShape ?

  Alt 27. Sep 2013, 09:50
Ich wollte mal meine Komponente Testen, jedoch wird nix dsrgestellt

Delphi-Quellcode:
unit LedUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
    TLED = class(TGraphicControl)
    //HoyLed: TShape;


  private
  { Private declarations }
  FActive: Boolean;
  procedure SetActive(const Value: Boolean);

  protected
  { Protected declarations }

  public
  { Public declarations }

  published
  { Published declarations }
     property Active: Boolean read FActive write SetActive;

end;


var
  LED: TLED;
  Shape : TShape;
  Brush: TShape;
  Color: TColor;
  ShowHint: Boolean;




implementation

{$R *.dfm}


procedure TLED.SetActive(const Value: Boolean);
begin
if Active <> FActive then
   begin
   FActive := Active;
   invalidate;
end;



begin
    Shape := TShape.Create(LED);


 with Shape do
 begin
 Left := 30;
 Top := 30;
 Width := 30;

end;
  end;
    end;


type
        TTriangleShape = class(TShape)

        private
        { Private declarations }

        protected
        { Protected declarations }
          procedure Paint; override;

        public
        { Public declarations }
        published
        { Published declarations }
end;


type
        TPointArray = array [0..2] of TPoint;
        PPointArray = ^TPointArray;

        procedure TTriangleShape.Paint;


begin
with Canvas do
        begin
        Polygon([Point(0, (Self.Height-2)), Point((Self.Width div 2), 0),
        Point(Self.Width, (Self.Height-2)), Point(0, (Self.Height-2))]);
        end;
           end;
jemand ne Ahnung warum nichts beim Test während der Laufzeit auf meinem Formular zu sehen ist ?? Ich langsam nicht mehr
Christian
  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 07:54 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